A diagnostic method for complex drilling conditions based on Bi-GRU+MLP

The Bi-GRU+MLP model overcomes the limitations of traditional methods in diagnosing complex drilling conditions. By utilizing data context information and nonlinear modeling capabilities, efficient diagnosis of complex drilling conditions is achieved, improving the safety and efficiency of the drilling process.

CN117312986BActive Publication Date: 2025-10-03YANGTZE UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311309353.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-10
Publication Date
2025-10-03
Estimated Expiration
2043-10-10

AI Technical Summary

Technical Problem

Existing technologies have limitations in traditional machine learning feature engineering processing and nonlinear relationship modeling in the diagnosis of complex drilling conditions. They cannot fully utilize data context information and lack scalability and flexibility, which affects the accurate diagnosis of complex drilling conditions.

Method used

A Bi-GRU+MLP-based method is adopted, which uses a combined model of bidirectional gated recurrent units and multi-layer perceptrons. Through feature extraction, feature selection and feature dimensionality reduction, a classifier for diagnosing complex drilling conditions is constructed. This method fully utilizes data context information and nonlinear modeling capabilities to achieve timely diagnosis of complex downhole conditions.

Benefits of technology

It improves the accuracy and flexibility of diagnosing complex drilling conditions, and can timely identify complex conditions such as lost circulation, overflow, oil and gas invasion, stuck pipe, drill tool breakage and water plugging, thereby improving the mechanical penetration rate and the safety and efficiency of the drilling process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117312986B_ABST
    Figure CN117312986B_ABST
Patent Text Reader

Abstract

The present invention provides a method for diagnosing complex drilling conditions based on Bi‑GRU+MLP, comprising selecting an original data set as a time series feature to be processed in the diagnosis of complex drilling conditions, and further comprising the following steps: establishing a network model for extracting characteristic parameters of complex drilling conditions based on Bi‑GRU, and generating validation set samples and test set samples; establishing a classifier model for diagnosing complex drilling conditions based on Bi‑GRU+MLP; using the validation set samples to evaluate the classifier model for diagnosing complex drilling conditions based on Bi‑GRU+MLP; and using the test set samples to perform a risk monitoring test on the classifier model for diagnosing complex drilling conditions based on Bi‑GRU+MLP. The present invention utilizes the advantages of the automatic learning feature representation, strong nonlinear modeling capability, full use of data context information, scalability and flexibility of the combined model of bidirectional gated recurrent units and multi-layer perceptrons to achieve timely diagnosis of six complex conditions during the drilling process, namely, well leakage, overflow, oil and gas invasion, drill bit sticking, drill bit fracture and water plugging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of drilling data processing, in particular to a Bi-GRU+MLP-based diagnosis method for complex drilling conditions. Background Art

[0002] During drilling operations, various complex conditions and downhole failures often occur, such as lost circulation, overflow, stuck pipe, and drill bit breakage. These accidents severely impact drilling speed and compromise safety, quality, and economic efficiency. With the rapid development of machine learning and big data technologies, rapid identification of downhole incidents through the optimization of characteristic parameters and the integration of intelligent models based on the response changes of various downhole and wellhead parameters to complex drilling conditions has become a trend in early diagnosis of complex drilling conditions.

[0003] Currently, most companies and universities train a variety of intelligent algorithm models by selecting different feature parameters and combining them with various machine learning algorithms to apply them to the diagnosis of complex drilling conditions. Existing technologies involving traditional machine learning feature engineering and nonlinear relationship modeling have limitations, hindering the intelligent models' ability to accurately diagnose complex drilling conditions.

[0004] Patent application number CN113062731A discloses a method for intelligently identifying complex drilling conditions, including: step 100, constructing logging characteristic parameters corresponding to different complex downhole conditions; step 200, constructing a BP neural network intelligent algorithm optimized using a particle swarm optimization algorithm; and step 300, creating a complex downhole condition early warning model based on the BP neural network intelligent algorithm in step 200. This method, when analyzing complex downhole condition data, fails to fully utilize data context to identify complex conditions, lacking scalability and flexibility. Summary of the Invention

[0005] In order to solve the above technical problems, the present invention proposes a method for diagnosing complex drilling conditions based on Bi-GRU+MLP, which utilizes the advantages of automatic learning feature representation, strong nonlinear modeling capabilities, full utilization of data context information, scalability and flexibility of the combined model of bidirectional gated recurrent units and multi-layer perceptrons to realize timely diagnosis of six complex conditions in the drilling process, including well leakage, overflow, oil and gas invasion, pipe sticking, drill tool fracture and water plugging.

[0006] The present invention aims to provide a method for diagnosing complex drilling conditions based on Bi-GRU+MLP, which includes selecting an original data set as a time series feature to be processed in the diagnosis of complex drilling conditions, and further includes the following steps:

[0007] Step 1: Establish a network model based on Bi-GRU to extract characteristic parameters of complex drilling conditions, and generate validation set samples and test set samples;

[0008] Step 2: Establish a Bi-GRU+MLP-based classifier model for complex drilling conditions diagnosis;

[0009] Step 3: Using the validation set samples to evaluate the Bi-GRU+MLP-based drilling complex working condition diagnosis classifier model;

[0010] Step 4: Use the test set samples to perform risk monitoring test on the Bi-GRU+MLP-based drilling complex working condition diagnosis classifier model.

[0011] Preferably, the original data set includes at least one of outlet flow rate, outlet density, outlet temperature, mud pool volume, standpipe pressure, torque, hook load, drilling time and bottom hole annular pressure.

[0012] In any of the above solutions, preferably, step 1 includes the following sub-steps:

[0013] Step 11: performing data preprocessing on the original data set;

[0014] Step 12: Use the data labeling method and sliding window to label the preprocessed data;

[0015] Step 13: Perform feature extraction and feature selection;

[0016] Step 14: Perform feature dimensionality reduction.

[0017] In any of the above solutions, preferably, the preprocessing includes at least one of the operations of removing erroneous data such as outliers and noise, normalization, and data stabilization.

[0018] In any of the above solutions, preferably, the normalization is used to perform a linear transformation on the original data in the original data set, and the formula is:

[0019]

[0020]

[0021]

[0022] Where min(x) is the minimum value in the original data, max(x) is the maximum value in the original data, n is the number of data points in the original data set, i is the i-th data point in the data set, and the original value x is mapped to a value x′ in the interval [0,1] through min-max normalization.

[0023] In any of the above solutions, preferably, step 13 includes inputting the labeled sequence data into the Bi-GRU network for training to obtain the hidden state corresponding to each time step.

[0024] In any of the above solutions, preferably, step 13 further includes a step of performing feature selection after obtaining the hidden state, and extracting a feature subset based on the feature importance score of the model.

[0025] In any of the above solutions, preferably, step 14 includes using principal component analysis to reduce the high-dimensional feature space to a low-dimensional space, specifically:

[0026] Set the original data set X = [x1, x2, ..., x m ], Then the covariance matrix of the original data set is:

[0027]

[0028] Where n is the total number of samples, d is the number of attributes of each data sample, and V is the transformation matrix of principal component analysis;

[0029] After eigendecomposition of the covariance matrix A of the original data set, a set of eigenvalues ​​λ1≥λ2≥…≥λ in descending order is obtained. d >0 and the corresponding unit eigenvectors v1,v2,…,v d , and Σ=diag(λ1,λ2,…,λ d ), the size of the target dimension k is determined by specifying the principal component weight threshold θ∈(0,1] to be retained. The formula is as follows:

[0030]

[0031] Take the eigenvectors corresponding to the first k eigenvalues ​​to form the principal component space V d×k =(v1,v2,…,v k ), where v i and v j are mutually orthogonal unit vectors,

[0032] Normalize the data X′ n×d Projected onto the principal component space V consisting of the first k eigenvectors d×k In the , we get the k-dimensional dataset Z after dimensionality reduction n×k , the formula is as follows:

[0033] Z n×k =X′ n×d V d×k .

[0034] In any of the above schemes, preferably, step 2 includes inputting the preprocessed data as a training set into the drilling complex working condition diagnosis classifier based on Bi-GRU+MLP to adjust parameters, and further obtain a stable drilling complex working condition diagnosis classifier model.

[0035] In any of the above solutions, preferably, the complex drilling condition diagnosis classifier model consists of two MLP layers, and the hidden layer is formed by introducing a ReLU function.

[0036] In any of the above solutions, it is preferred that when the complex drilling condition diagnosis classifier model processes multi-classification tasks, the Softmax function is selected as the activation function of the output layer. The Softmax function formula is:

[0037]

[0038] Among them, x j is the jth element in the input vector, exp(x j ) represents the x of e j power, sum(exp(x m )) represents the sum of the exponential functions of all input elements.

[0039] In any of the above solutions, preferably, when training the complex drilling condition diagnosis classifier model, categorical-crossentropy is used as the loss function, and the formula is:

[0040]

[0041] Among them, F1 represents the loss value; y k Represents the true value corresponding to the k-th category; Indicates the corresponding model output value.

[0042] In any of the above solutions, preferably, the model performance evaluation indicators include accuracy, recall, precision and F1 classification.

[0043] In any of the above solutions, it is preferred that the formula for the accuracy rate ACC is:

[0044]

[0045] Among them, TP is the positive sample predicted by the model as positive, TN is the negative sample predicted by the model as negative, FP is the negative sample predicted by the model as positive, and FN is the positive sample predicted by the model as negative.

[0046] In any of the above solutions, it is preferred that the formula for the recall rate P is:

[0047]

[0048] In any of the above solutions, it is preferred that the formula for the precision rate P is:

[0049]

[0050] In any of the above solutions, it is preferred that the formula for the F1 classification is:

[0051]

[0052] In any of the above solutions, preferably, step 4 includes inputting new drilling condition data into the model, predicting it through the MLP classifier, and determining whether it is normal or an abnormal state such as lost circulation.

[0053] This paper proposes a Bi-GRU+MLP-based method for diagnosing complex drilling conditions. Based on the nonlinear relationship between ROP and drilling parameters, a Copula function is used to construct a joint distribution function between ROP and drilling parameters. This method leverages existing data to efficiently and accurately optimize parameters. This method then uses the optimal parameter combination to significantly improve ROP.

[0054] Bi-GRU, Bidirectional-gated recurrent unit, bidirectional gated recurrent unit.

[0055] MLP, Multilayer Perceptron, multi-layer perceptron.

[0056] Categorical-crossentropy is a loss function commonly used in multi-category classification problems to evaluate the difference between the model's prediction and the true category. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 The flowchart of a preferred embodiment of the Bi-GRU+MLP-based method for diagnosing complex drilling conditions according to the present invention.

[0058] Figure 2 This is a flow chart of another preferred embodiment of the Bi-GRU+MLP-based complex drilling condition diagnosis method according to the present invention.

[0059] Figure 3 Schematic diagram of an embodiment of the internal structure of the GRU of the Bi-GRU+MLP-based complex drilling condition diagnosis method according to the present invention.

[0060] Figure 4Schematic diagram of an embodiment of the Bi-GRU network structure of the Bi-GRU+MLP-based complex drilling condition diagnosis method according to the present invention.

[0061] Figure 5 Schematic diagram of an embodiment of the MLP network structure of the Bi-GRU+MLP-based complex drilling condition diagnosis method according to the present invention.

[0062] Figure 6 Schematic diagram of an embodiment of a Bi-GRU+MLP-based network model of the Bi-GRU+MLP-based complex drilling condition diagnosis method according to the present invention.

[0063] Figure 7 Schematic diagram of the performance of an embodiment of a complex drilling condition diagnosis model according to the Bi-GRU+MLP-based complex drilling condition diagnosis method of the present invention. DETAILED DESCRIPTION

[0064] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0065] Example 1

[0066] like Figure 1 As shown, a method for diagnosing complex drilling conditions based on Bi-GRU+MLP is performed. Step 100 is executed to select an original data set as a time series feature to be processed in the diagnosis of complex drilling conditions. The original data set includes at least one of outlet flow rate, outlet density, outlet temperature, mud pool volume, standpipe pressure, torque, hook load, drilling time, and bottom hole annular pressure.

[0067] Execute step 110 to establish a network model based on Bi-GRU to extract characteristic parameters of complex drilling conditions, and generate validation set samples and test set samples, including the following sub-steps:

[0068] Execute step 111 to perform data preprocessing on the original data set, wherein the preprocessing includes at least one of removing erroneous data such as outliers and noise, normalizing, and stabilizing the data. The normalization is used to perform a linear transformation on the original data in the original data set, and the formula is:

[0069]

[0070]

[0071]

[0072] Where min(x) is the minimum value in the original data, max(x) is the maximum value in the original data, n is the number of data points in the original data set, i is the i-th data point in the data set, and the original value x is mapped to a value x′ in the interval [0,1] through min-max normalization.

[0073] Executing step 112, using a data labeling method and a sliding window to label the preprocessed data;

[0074] Execute step 113 to perform feature extraction and feature selection. Input the labeled sequence data into the Bi-GRU network for training to obtain the hidden state corresponding to each time step. After obtaining the hidden state, perform the feature selection step to extract the feature subset based on the feature importance score of the model. In this embodiment, the most relevant and discriminative feature subset is selected from the extracted features.

[0075] Execute step 114 to perform feature dimensionality reduction, and use principal component analysis to reduce the high-dimensional feature space back to a low-dimensional space. Specifically,

[0076] Set the original data set X = [x1, x2, ..., x m ], Then the covariance matrix of the original data set is:

[0077]

[0078] Where n is the total number of samples, d is the number of attributes of each data sample, and V is the transformation matrix of principal component analysis;

[0079] After eigendecomposition of the covariance matrix A of the original data set, a set of eigenvalues ​​λ1≥λ2≥…≥λ in descending order is obtained. d >0 and the corresponding unit eigenvectors v1,v2,…,v d , and Σ=diag(λ1,λ2,…,λ d ), the size of the target dimension k is determined by specifying the principal component weight threshold θ∈(0,1] to be retained. The formula is as follows:

[0080]

[0081] Take the eigenvectors corresponding to the first k eigenvalues ​​to form the principal component space V d×k =(v1,v2,…,v k ), where v i and v j are mutually orthogonal unit vectors,

[0082] Normalize the data X′ n×d Projected onto the principal component space V consisting of the first k eigenvectorsd×k In the , we get the k-dimensional dataset Z after dimensionality reduction n×k , the formula is as follows:

[0083] Z n×k =X′ n×d V d×k .

[0084] Execute step 120 to establish a Bi-GRU+MLP-based drilling complex working condition diagnosis classifier model, input the preprocessed data as a training set into the Bi-GRU+MLP-based drilling complex working condition diagnosis classifier to adjust parameters, and further obtain a stable drilling complex working condition diagnosis classifier model. The drilling complex working condition diagnosis classifier model consists of two MLP layers, and the hidden layer is formed by introducing the ReLU function. When the drilling complex working condition diagnosis classifier model processes multi-classification tasks, the Softmax function is selected as the activation function of the output layer. The Softmax function formula is:

[0085]

[0086] Among them, x j is the jth element in the input vector, exp(x j ) represents the x of e j power, sum(exp(x m )) represents the sum of the exponential functions of all input elements.

[0087] In any of the above solutions, preferably, when training the complex drilling condition diagnosis classifier model, categorical-crossentropy is used as the loss function, and the formula is:

[0088]

[0089] Among them, F1 represents the loss value; y k Represents the true value corresponding to the k-th category; Indicates the corresponding model output value.

[0090] In any of the above solutions, preferably, the model performance evaluation indicators include accuracy, recall, precision and F1 classification.

[0091] Execute step 130 to evaluate the Bi-GRU+MLP-based complex drilling condition diagnosis classifier model using the validation set samples. Model performance evaluation indicators include accuracy, recall, precision, and F1 classification.

[0092] The formula of the accuracy rate ACC is:

[0093]

[0094] Among them, TP is the positive sample predicted by the model as positive, TN is the negative sample predicted by the model as negative, FP is the negative sample predicted by the model as positive, and FN is the positive sample predicted by the model as negative.

[0095] The formula for the recall rate P is

[0096]

[0097] The formula for the precision rate P is:

[0098]

[0099] The formula for the F1 classification is

[0100]

[0101] Execute step 140, use the test set samples to perform a risk monitoring test on the Bi-GRU+MLP-based complex drilling condition diagnosis classifier model, input new drilling condition data into the model, and predict it through the MLP classifier to determine whether it is normal or in an abnormal state such as a lost circulation.

[0102] Example 2

[0103] The present invention provides a method for diagnosing complex drilling conditions based on Bi-GRU+MLP. The method uses a bidirectional-gated recurrent unit (Bi-GRU) as a feature extractor to learn data context information in drilling parameters. Supervised learning extracts nine data time series features, including outlet flow, outlet density, outlet temperature, mud pool volume, riser pressure, torque, hook load, drilling time, and bottom hole annular pressure, as feature parameters for diagnosing complex drilling conditions. A multilayer perceptron (MLP) is used as a classifier for diagnosing complex drilling conditions. The MLP's powerful nonlinear modeling capability can be utilized. Through the combination of multiple hidden layers, the MLP can learn more complex decision boundaries, thereby improving the intelligent model's ability to fit abnormal data. An intelligent model based on Bi-GRU feature extraction and MLP classification is constructed for diagnosing complex drilling conditions.

[0104] A method for diagnosing complex drilling conditions based on Bi-GRU+MLP, with the following steps:

[0105] Step 1: Select nine original data sets, including outlet flow, outlet density, outlet temperature, mud pool volume, standpipe pressure, torque, hook load, drilling time, and bottomhole annular pressure, as the time series features to be processed in the diagnosis of complex drilling conditions.

[0106] In step 1, the outlet flow, outlet density, outlet temperature, mud pool volume, riser pressure, and hook load can be obtained by multiple sensors, and the torque and bottom hole annular pressure can be measured by a while-drilling measurement tool. The data measured by the sensors and the while-drilling measurement tool in step 1 are transmitted to a USB data acquisition card and then transmitted to the industrial computer through an RS485 converter.

[0107] Step 2: Establish a network model based on Bi-GRU to extract characteristic parameters of complex drilling conditions.

[0108] The 9 original data sets selected in step 1 are subjected to data preprocessing, and the preprocessing steps include removing erroneous data such as outliers and noise, normalizing, stabilizing the data, and other operations to ensure the quality and accuracy of the data.

[0109] In the above method, the normalization method performs a linear transformation on the original data. The specific formula is as follows:

[0110]

[0111]

[0112]

[0113] Where min(x) is the minimum value in the data, max(x) is the maximum value in the data, and the original value x is mapped to the value x′ in the interval [0,1] through min-max normalization.

[0114] Furthermore, the data labeling method, before training the network model based on Bi-GRU for extracting characteristic parameters of complex drilling conditions, takes the time when risk occurs in the drilling logs of 30 wells in a certain exploration area in the west as a reference point, and uses a sliding window to label the data. The sliding window length is 64 and the time step is 1; risk-free drilling is represented by 1000000; well leakage condition is represented by 0100000; overflow condition is represented by 0010000; oil and gas invasion condition is represented by 0001000; stuck drill condition is represented by 0000100; broken drill bit condition is represented by 0000010; water hole plugging condition is represented by 0000001.

[0115] Furthermore, feature extraction and feature selection are performed. The labeled sequence data is input into the Bi-GRU network for training to obtain the hidden state corresponding to each time step. After obtaining the hidden state, the feature selection step is performed to extract the most relevant and discriminative feature subset from the features, thereby improving the accuracy of the MLP-based complex drilling condition diagnosis classifier.

[0116] Furthermore, feature dimensionality reduction is performed. After a series of feature changes, the original feature space becomes a high-dimensional space, which is not conducive to model training and testing. Therefore, principal component analysis (PCA) is used to reduce the high-dimensional feature space back to a low-dimensional space to improve the performance and interpretability of the model. The specific formula is as follows:

[0117] The original data set X=[x1, x2, ..., x m ], Where n is the total number of samples, d is the number of attributes of each data sample, then the covariance matrix of the original data set is:

[0118]

[0119] After eigendecomposition of A, we get a set of descending eigenvalues ​​λ1≥λ2≥…≥λd>0 and the corresponding unit eigenvectors v1,v2,…,v d , and Σ=diag(λ1,λ2,…,λd). The larger the eigenvalue, the more important the corresponding principal component. The size of the target dimension k is determined by specifying the principal component weight threshold θ∈(0,1] to be retained. The formula is as follows:

[0120]

[0121] Take the eigenvectors corresponding to the first k eigenvalues ​​to form the principal component space V d×k =(v1,v2,…,v k ), where v i and v j Are mutually orthogonal unit vectors. n×d Projected onto the principal component space V consisting of the first k eigenvectors d×k In the , we get the k-dimensional dataset Z after dimensionality reduction n×k The formula is as follows:

[0122] Z n×k =X′ n×d V d×k 6)

[0123] Step 3: Establish a Bi-GRU+MLP-based classification model for complex drilling conditions diagnosis

[0124] Among them, the outlet flow, outlet density, outlet temperature, mud pool volume, riser pressure, torque, hook load, drilling time, bottom hole annular pressure and other data after data preprocessing in step 2 are input as a training set into the drilling complex working condition diagnosis classifier based on Bi-GRU+MLP for parameter adjustment, and further obtain a stable drilling complex working condition diagnosis classifier model; after recognition and diagnosis by the drilling complex working condition diagnosis classifier model, 7 classification results can be obtained: normal drilling, well leakage, overflow, oil and gas, stuck pipe, broken drill bit, and water hole plugging.

[0125] Furthermore, the hidden layer, the MLP complex drilling condition diagnosis classifier model consists of two MLP layers. The hidden layer introduces the ReLU function, so that the feature parameters can be nonlinearly transformed, helping the network to learn more complex features.

[0126] Furthermore, in the output layer, when the MLP model processes multi-classification tasks, the Softmax function is selected as the activation function of the output layer. When the data set was divided, the seven operating conditions of normal drilling, lost circulation, overflow, oil and gas, stuck drill, broken drill tool, and water plugging were processed by one-hot encoding. Therefore, the number of nodes in the output layer of the network model was set to 7. The output parameters of the network model are the probability values ​​corresponding to the seven operating conditions, that is, the probability of the sample belonging to each type of operating condition. The Softmax function formula is as follows:

[0127]

[0128] Among them, x j is the jth element in the input vector, exp(x j ) represents the x of e j power, sum(exp(x m )) represents the sum of the exponential functions of all input elements

[0129] Furthermore, in model training, when training the Bi-GRU+MLP-based complex drilling condition diagnosis classifier model, categorical-crossentropy was used as the loss function; the network model training hyperparameters were set to a batch size of 32, 150 iterations, and a learning rate of 0.01; and the Adam optimization algorithm was used to update the network model weights. The specific formula of the loss function is as follows:

[0130]

[0131] Where F1 represents the loss value; y i Represents the true value corresponding to the i-th category; Indicates the corresponding model output value.

[0132] Step 4: Use the validation set samples in step 2 to evaluate a Bi-GRU+MLP-based drilling complex working condition diagnosis classifier model. Figure 5 Schematic diagram of the network model based on Bi-GRU+MLP.

[0133] In order to evaluate the performance indicators of the Bi-GRU+MLP-based complex drilling condition diagnosis classifier model in step 3, the present invention uses accuracy, recall, precision, and F1 classification as model performance evaluation indicators; normal drilling samples are regarded as positive samples, and risk samples such as lost circulation are regarded as negative samples; the model performance evaluation indicator formulas are as follows:

[0134] Accuracy (Acc)

[0135]

[0136] Precision

[0137]

[0138] Recall

[0139]

[0140] F1-Score

[0141]

[0142] Where TP is the positive sample predicted by the model as positive, FP is the negative sample predicted by the model as positive, FN is the positive sample predicted by the model as negative, and TN is the negative sample predicted by the model as negative.

[0143] Step 5: Use the test set samples in step 2 to perform risk monitoring test on the Bi-GRU+MLP-based drilling complex working condition diagnosis classifier model.

[0144] The test set samples are used to conduct a final evaluation of the model and diagnose complex drilling conditions. New drilling condition data is input into the model and predicted by the MLP classifier to determine whether it is normal or abnormal, such as lost circulation.

[0145] The beneficial effects of the present invention are:

[0146] On the one hand, the present invention uses a bidirectional gated circulation unit to analyze the data context information of complex drilling working condition parameters, and uses 9 original data sets including outlet flow, outlet density, outlet temperature, mud pool volume, riser pressure, torque, hook load, drilling time, and bottom hole annular pressure as the time series features to be processed in the diagnosis of complex drilling working conditions, which can more fully provide trend characteristics in the original data.

[0147] On the other hand, the present invention introduces a multi-layer perceptron into the complex drilling working condition diagnosis model, uses the multi-layer perceptron to process the nonlinear relationship in the original data, and effectively improves the classification and processing capability of the complex drilling working condition diagnosis model.

[0148] Example 3

[0149] In an embodiment of the present invention, a method for diagnosing complex drilling conditions based on Bi-GRU+MLP is provided. Bi-GRU is used as a feature extractor to learn data context information in drilling parameters, and supervised learning is used to extract nine data time series features, including outlet flow, outlet density, outlet temperature, mud pool volume, riser pressure, torque, hook load, drilling time, and bottom hole annular pressure, as feature parameters for diagnosing complex drilling conditions. MLP is used as a classifier for diagnosing complex drilling conditions. The powerful nonlinear modeling capability of MLP can be utilized. Through the combination of multiple hidden layers, MLP can learn more complex decision boundaries, thereby improving the intelligent model's ability to fit abnormal data. An intelligent model based on Bi-GRU feature extraction and MLP classification is constructed for diagnosing complex drilling conditions.

[0150] In the embodiments of the present invention, consideration is given to the complex drilling conditions, which are influenced by factors such as formation complexity and construction equipment, leading to certain errors when measuring drilling parameter changes. Therefore, at the initial design stage, through extensive field research and literature analysis, the present invention selected nine characteristic parameters closely related to complex drilling conditions: outlet flow rate, outlet density, outlet temperature, mud pool volume, standpipe pressure, torque, hook load, drilling time, and bottomhole annular pressure. The patterns of these parameters' variations are shown in Table 1.

[0151] Table 1 Abnormal change trend of main drilling parameters

[0152]

[0153] Explanation of the symbols in Table 1: “sudden drop” indicates a sudden decrease, and “sudden increase” indicates a sudden increase.

[0154] Example 4

[0155] In an embodiment of the present invention, a method for diagnosing complex drilling conditions based on Bi-GRU+MLP is as follows: Figure 2 The specific steps are as follows:

[0156] S1. Select nine original data sets, including outlet flow, outlet density, outlet temperature, mud pool volume, standpipe pressure, torque, hook load, drilling time, and bottomhole annular pressure, as the time series features to be processed in the diagnosis of complex drilling conditions.

[0157] Among them, the outlet flow, outlet density, outlet temperature, mud pool volume, standpipe pressure, and hook load in S1 can be obtained by multiple sensors, and the torque and bottom hole annular pressure can be measured by a while drilling measurement tool; the data measured by the sensors and the while drilling measurement tool in step 1 are transmitted to a USB data acquisition card and then transmitted to the industrial computer through an RS485 converter.

[0158] S2. Establish a network model based on Bi-GRU to extract characteristic parameters of complex drilling conditions, such as Figure 3 and Figure 4 As shown in Figure 2, the internal structure of GRU and the Bi-GRU network structure are schematic diagrams, and Table 2 shows the feature engineering Bi-GRU architecture.

[0159] Table 2 Feature Engineering Bi-GRU Architecture

[0160]

[0161] The 9 original data sets selected in S1 are subjected to data preprocessing, and the preprocessing steps include removing erroneous data such as outliers and noise, normalizing, stabilizing the data, and other operations to ensure the quality and accuracy of the data.

[0162] In the above method, the normalization method performs a linear transformation on the original data. The specific formula is as follows:

[0163]

[0164]

[0165]

[0166] Where min(x) is the minimum value in the data, max(x) is the maximum value in the data, and the original value x is mapped to the value x′ in the interval [0,1] through min-max normalization.

[0167] Furthermore, the data labeling method, before training the network model based on Bi-GRU to extract characteristic parameters of complex drilling conditions, a complex drilling condition data set was constructed using parameter logging data of 30 wells in a western exploration area, of which data from 22 wells were used as model training data sets, data from 5 wells were used as model verification data sets, and data from the other 3 wells were used for model testing; the data set contained 2365 groups of normal samples and 1850 groups of risk samples, each group of samples including 11 parameters such as outlet flow, outlet density, outlet temperature, mud pool volume, riser pressure, torque, hook load, drilling time, bottom hole annular pressure, type of complex drilling condition and training labels after unique hot encoding processing; the time of risk occurrence in the drilling logs of these 30 wells was used as the reference point, and the data were labeled using a sliding window with a sliding window length of 64 and a time step of 1. Table 3 shows the data set division.

[0168] Table 3 Dataset division

[0169]

[0170] Explanation of markings in the appendix: Risk-free drilling is indicated by 1000000; lost circulation condition is indicated by 0100000; overflow condition is indicated by 0010000; oil and gas invasion condition is indicated by 0001000; stuck pipe condition is indicated by 0000100; broken drill bit condition is indicated by 0000010; water hole plugging condition is indicated by 0000001.

[0171] Furthermore, feature extraction and feature selection are performed. The labeled sequence data is input into the Bi-GRU network for training to obtain the hidden state corresponding to each time step. After obtaining the hidden state, the feature selection step is performed to extract the most relevant and discriminative feature subset from the features, thereby improving the accuracy of the MLP-based complex drilling condition diagnosis classifier.

[0172] Furthermore, feature dimensionality reduction is performed. After a series of feature changes, the original feature space becomes a high-dimensional space, which is not conducive to model training and testing. Therefore, principal component analysis (PCA) is used to reduce the high-dimensional feature space back to a low-dimensional space to improve the performance and interpretability of the model. The specific formula is as follows:

[0173] The data set obtained by the above data normalization formula Where n is the total number of samples, d is the number of attributes of each data sample, then the covariance matrix of the original data set is:

[0174]

[0175] After performing eigendecomposition on A, we get a set of eigenvalues ​​in descending order λ1≥λ2≥…≥λ d >0 and the corresponding unit eigenvectors v1,v2,…,vd , and Σ=diag(λ1,λ2,…,λ d ). The larger the eigenvalue, the more important the corresponding principal component. The size of the target dimension k is determined by specifying the principal component weight threshold θ∈(0,1] to be retained. The formula is as follows:

[0176]

[0177] Take the eigenvectors corresponding to the first k eigenvalues ​​to form the principal component space V d×k =(v1,v2,…,v k ), where v i and v j Are mutually orthogonal unit vectors. n×d Projected onto the principal component space V consisting of the first k eigenvectors d×k In the , we get the k-dimensional dataset Z after dimensionality reduction n×k The formula is as follows:

[0178] Z n×k =X′ n×d V d×k 6)

[0179] S3. Establish a Bi-GRU+MLP-based classification model for complex drilling conditions diagnosis, such as Figure 5 The figure shows the schematic diagram of the MLP network structure, and Table 4 shows the classification MLP neural network architecture.

[0180] Table 4 Classification MLP neural network architecture

[0181]

[0182] Among them, the outlet flow, outlet density, outlet temperature, mud pool volume, riser pressure, torque, hook load, drilling time, bottom hole annular pressure and other data after data preprocessing in S2 are input as a training set into the drilling complex working condition diagnosis classifier based on Bi-GRU+MLP for parameter adjustment, and further obtain a stable drilling complex working condition diagnosis classifier model; after recognition and diagnosis by the drilling complex working condition diagnosis classifier model, 7 classification results can be obtained, including normal drilling, well leakage, overflow, oil and gas, stuck drill, broken drill bit, and water plugging.

[0183] Furthermore, the hidden layer, the MLP complex drilling condition diagnosis classifier model consists of two MLP layers. The hidden layer introduces the ReLU function, so that the feature parameters can be nonlinearly transformed, helping the network to learn more complex features.

[0184] Furthermore, in the output layer, when the MLP model processes multi-classification tasks, the Softmax function is selected as the activation function of the output layer. When the data set was divided, the seven operating conditions of normal drilling, lost circulation, overflow, oil and gas, stuck drill, broken drill tool, and water plugging were processed by one-hot encoding. Therefore, the number of nodes in the output layer of the network model was set to 7. The output parameters of the network model are the probability values ​​corresponding to the seven operating conditions, that is, the probability of the sample belonging to each type of operating condition. The Softmax function formula is as follows:

[0185]

[0186] where x i is the i-th element in the input vector, exp(x i ) represents the x of e i power, sum(exp(x j )) represents the sum of the exponential functions of all input elements.

[0187] Furthermore, in model training, when training the Bi-GRU+MLP-based complex drilling condition diagnosis classifier model, categorical-crossentropy was used as the loss function; the network model training hyperparameters were set to a batch size of 32, 150 iterations, and a learning rate of 0.01; and the Adam optimization algorithm was used to update the network model weights. The specific formula of the loss function is as follows:

[0188]

[0189] Where F1 represents the loss value; y i Represents the true value corresponding to the i-th category; Indicates the corresponding model output value.

[0190] S4. Use the validation set samples in S2 to evaluate a Bi-GRU+MLP-based drilling complex working condition diagnosis classifier model, such as Figure 6 The figure shows a schematic diagram of the network model based on Bi-GRU+MLP.

[0191] In order to evaluate the performance indicators of the Bi-GRU+MLP-based complex drilling condition diagnosis classifier model in S3, the present invention uses accuracy, recall, precision, and F1 classification as model performance evaluation indicators; normal drilling samples are regarded as positive samples, and risk samples such as lost circulation are regarded as negative samples; the model performance evaluation indicator formulas are as follows:

[0192] Accuracy (Acc)

[0193]

[0194] Precision

[0195]

[0196] Recall

[0197]

[0198] F1-Score

[0199]

[0200] Where TP is the positive sample predicted by the model as positive, FP is the negative sample predicted by the model as positive, FN is the positive sample predicted by the model as negative, and TN is the negative sample predicted by the model as negative.

[0201] Furthermore, a Bi-GRU+MLP-based complex drilling condition diagnosis model was evaluated using validation set samples. The performance of the complex drilling condition diagnosis model is shown in Figure 2. Figure 7 shown.

[0202] The accuracy of a complex drilling condition diagnosis model based on Bi-GRU+MLP can reach 95.29%, indicating that this evaluation model has good accuracy and the evaluation results can provide support for scientific decision-making.

[0203] S5. Use the test set samples in S2 to perform risk monitoring tests on the Bi-GRU+MLP-based drilling complex working condition diagnosis classifier model.

[0204] The test set samples are used to conduct a final evaluation of the model and diagnose complex drilling conditions. New drilling condition data is input into the model and predicted by the MLP classifier to determine whether it is normal or abnormal, such as lost circulation.

[0205] In order to better understand the present invention, the above is described in detail in conjunction with the specific embodiments of the present invention, but it is not intended to limit the present invention. Any simple modifications made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention. Each embodiment in this specification focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

Claims

1. A method for diagnosing complex drilling conditions based on Bi-GRU+MLP, comprising selecting an original data set as time series features to be processed in diagnosing complex drilling conditions, and further comprising the following steps: Step 1: Establish a network model based on Bi-GRU to extract characteristic parameters of complex drilling conditions and generate validation set samples and test set samples, including the following sub-steps: Step 11: performing data preprocessing on the original data set; Step 12: Use the data labeling method and sliding window to label the preprocessed data; Step 13: Perform feature extraction and feature selection; Step 14: Perform feature dimensionality reduction, including using principal component analysis to reduce the high-dimensional feature space back to a low-dimensional space. Specifically Set the original dataset Then the covariance matrix of the original data set is: Where n is the total number of samples, d is the number of attributes of each data sample, and V is the transformation matrix of principal component analysis; After eigendecomposition of the covariance matrix A of the original data set, a set of eigenvalues ​​λ1≥λ2≥…≥λ in descending order is obtained. d >0 and the corresponding unit eigenvectors v1,v2,…,v d , and Σ=diag(λ1,λ2,…,λ d ), the size of the target dimension k is determined by specifying the principal component weight threshold θ∈(0,1] to be retained. The formula is as follows: Take the eigenvectors corresponding to the first k eigenvalues ​​to form the principal component space V d×k =(v1,v2,…,v k ), where v i and v j are mutually orthogonal unit vectors, Normalize the data X ′ n×d Projected onto the principal component space V consisting of the first k eigenvectors d×k In the , we get the k-dimensional dataset Zn after dimensionality reduction ×k , the formula is as follows: Z n×k =X′ n×d V d×k ; Step 2: Establish a Bi-GRU+MLP-based classifier model for complex drilling conditions diagnosis; Step 3: Using the validation set samples to evaluate the Bi-GRU+MLP-based drilling complex working condition diagnosis classifier model; Step 4: Use the test set samples to perform risk monitoring test on the Bi-GRU+MLP-based drilling complex working condition diagnosis classifier model.

2. The Bi-GRU+MLP-based complex drilling condition diagnosis method according to claim 1, characterized in that: The preprocessing includes normalization, which is used to perform linear transformation on the original data in the original data set. The formula is: Where min(x) is the minimum value in the original data, max(x) is the maximum value in the original data, n is the number of data points in the original data set, i is the i-th data point in the data set, and the original value x is mapped to a value x in the interval [0,1] through min-max normalization. ′ .

3. The Bi-GRU+MLP-based complex drilling condition diagnosis method according to claim 2, characterized in that: The step 13 includes inputting the labeled sequence data into the Bi-GRU network for training, obtaining the hidden state corresponding to each time step, and after obtaining the hidden state, performing a feature selection step to extract a feature subset based on the feature importance score of the model.

4. The Bi-GRU+MLP-based complex drilling condition diagnosis method according to claim 3, characterized in that: The step 2 includes inputting the preprocessed data as a training set into a Bi-GRU+MLP-based drilling complex working condition diagnosis classifier to adjust parameters, thereby further obtaining a stable drilling complex working condition diagnosis classifier model.

5. The Bi-GRU+MLP-based complex drilling condition diagnosis method according to claim 4, characterized in that: When the complex drilling condition diagnosis classifier model processes multi-classification tasks, the Softmax function is selected as the activation function of the output layer. The Softmax function formula is: Among them, x j is the jth element in the input vector, exp(x j ) represents the x of e j power, sum(exp(x m )) represents the sum of the exponential functions of all input elements.

6. The Bi-GRU+MLP-based complex drilling condition diagnosis method according to claim 5, characterized in that: When training the complex drilling condition diagnosis classifier model, categorical-crossentropy is used as the loss function, and the formula is: Among them, F1 represents the loss value; y k Represents the true value corresponding to the k-th category; Indicates the corresponding model output value.

7. The Bi-GRU+MLP-based method for diagnosing complex drilling conditions according to claim 6, characterized in that: Model performance evaluation indicators include accuracy, recall, precision and F1 classification.

8. The Bi-GRU+MLP-based method for diagnosing complex drilling conditions according to claim 7, characterized in that: The formula of the accuracy rate ACC is: Among them, TP is the positive sample predicted by the model as positive, TN is the negative sample predicted by the model as negative, FP is the negative sample predicted by the model as positive, and FN is the positive sample predicted by the model as negative.

Citation Information

Patent Citations

  • Intelligent identification method for complex working conditions under drilling well

    CN113062731A

  • BiGRU network drilling working condition identification method combined with attention mechanism

    CN114596010A