CN116702944A - Method simultaneously suitable for predicting rheological parameters of water-based and oil-based drilling fluid - Google Patents

Method simultaneously suitable for predicting rheological parameters of water-based and oil-based drilling fluid Download PDF

Info

Publication number
CN116702944A
CN116702944A CN202310464487.8A CN202310464487A CN116702944A CN 116702944 A CN116702944 A CN 116702944A CN 202310464487 A CN202310464487 A CN 202310464487A CN 116702944 A CN116702944 A CN 116702944A
Authority
CN
China
Prior art keywords
drilling fluid
oil
water
model
prediction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310464487.8A
Other languages
Chinese (zh)
Inventor
邓嵩
霍炳钊
闫霄鹏
李朝玮
王江帅
郝宏达
张怡昕
杨凯
时亚东
孙延帅
王金星
先必华
蔡楚楚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changzhou University
Original Assignee
Changzhou University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changzhou University filed Critical Changzhou University
Priority to CN202310464487.8A priority Critical patent/CN116702944A/en
Publication of CN116702944A publication Critical patent/CN116702944A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/02Agriculture; Fishing; Forestry; Mining

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • Tourism & Hospitality (AREA)
  • Theoretical Computer Science (AREA)
  • Marketing (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Quality & Reliability (AREA)
  • Animal Husbandry (AREA)
  • Game Theory and Decision Science (AREA)
  • Operations Research (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Agronomy & Crop Science (AREA)
  • Development Economics (AREA)
  • Marine Sciences & Fisheries (AREA)
  • Mining & Mineral Resources (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a method for predicting rheological parameters of water-based and oil-based drilling fluid, which comprises the following steps of collecting data of drilling fluid performance from a daily report of the drilling fluid; converting part of the data into target parameters of a prediction model; selecting characteristic parameters and constructing characteristic variables of a prediction model; processing the data by adopting different methods; calculating a spearman rank correlation coefficient to verify the correlation between the selected characteristic parameters and the characteristic variables; dividing the characteristic parameters and the target parameters to construct a random forest model; optimizing the model; selecting an index evaluation model to obtain an optimal super-parameter combination and a prediction result; the method can be simultaneously applied to rheological property prediction of water-based and oil-based drilling fluids, overcomes the defect of limited application range of the existing model, effectively improves the prediction efficiency of the rheological property of the drilling fluid, and solves the problem of inaccurate prediction of the rheological property of the drilling fluid due to frequent adjustment of the drilling fluid.

Description

Method simultaneously suitable for predicting rheological parameters of water-based and oil-based drilling fluid
Technical Field
The application relates to the technical field of petroleum drilling, in particular to a method for predicting rheological parameters of water-based and oil-based drilling fluid.
Background
In recent years, the development of artificial intelligence technology has provided the basis for prediction of drilling fluid rheology, although some rheological prediction models have been established based on common parameters at the drilling site. However, the existing drilling fluid rheological prediction model is built for the same type of drilling fluid, and for the situation of frequently adjusting the type of drilling fluid, the prediction accuracy rate of the existing drilling fluid rheological prediction model is greatly reduced, and even the existing drilling fluid rheological prediction model cannot be applicable.
With the development of drilling towards deep and complex stratum, the performance of drilling fluid is required to be higher and higher, taking the deep and big north blocks of Tarim oil fields in China as an example, when the same well is drilled, the types of the drilling fluid can be frequently adjusted to adapt to the requirements of different stratum, and in order to reduce the cost, water-based drilling fluid is mainly adopted from shallow stratum to middle stratum; deep and ultra-deep formations are mainly water-in-oil drilling fluids or full oil-based drilling fluids to reduce the occurrence of downhole complications, in which case it is important to build a rheological parametric model that can predict different types of drilling fluids simultaneously. However, the traditional drilling fluid rheological property measurement is low in efficiency, tedious and time-consuming, and if the rheological property of the drilling fluid cannot be accurately mastered, the safety of drilling cannot be ensured.
Disclosure of Invention
This section is intended to outline some aspects of embodiments of the application and to briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section as well as in the description of the application and in the title of the application, which may not be used to limit the scope of the application.
The application is provided in view of the problems of frequent adjustment of drilling fluid types and low efficiency and complicated time consumption of traditional drilling fluid rheological property measurement in the conventional petroleum drilling.
It is therefore an object of the present application to provide a method which is suitable for both water-based and oil-based drilling fluid rheological parameter prediction, with the object of: the influence of the oil phase content and the water phase content of the drilling fluid on the rheological property of the drilling fluid is fully considered, and the method can be simultaneously applied to water-based and oil-based drilling fluids; the new model effectively improves the prediction efficiency of the rheological property of the drilling fluid, and simultaneously overcomes the defect of limited application range of the existing model.
In order to solve the technical problems, the application provides the following technical scheme: the method comprises the following specific steps:
collecting drilling fluid performance data from a drilling fluid daily report;
converting part of the data into target parameters of a drilling fluid rheological property prediction model;
determining characteristic parameters from the collected data, and constructing characteristic variables of a prediction model;
processing the data by adopting different methods;
verifying the correlation of the selected characteristic parameters and the characteristic variables by calculating the spearman rank correlation coefficient;
dividing the characteristic parameters and the target parameters to construct a random forest model;
optimizing the model by adopting a grid search method and a K-fold cross validation method;
r is selected for 2 And (3) obtaining an optimal hyper-parameter combination and a prediction result by using the RMSE index evaluation model.
As a preferred embodiment of the method of the present application for simultaneous prediction of rheological parameters of water-based and oil-based drilling fluids, the method comprises: the data includes drilling fluid density, funnel viscosity, drilling fluid temperature, drilling fluid oil phase content, drilling fluid water phase content, values of R300 and R600, including drilling fluids comprising water-based, water-in-oil, and whole oil-based, respectively.
As a preferred embodiment of the method of the present application for simultaneous prediction of rheological parameters of water-based and oil-based drilling fluids, the method comprises: the partial data includes values of R300 and R600, and the target parameters include apparent viscosity AV, plastic viscosity PV, flow behavior index n, and dynamic shear force YP, converted according to the following formula:
PV=R600-R300
YP=R300-PV
where R300 and R600 represent the rheometer readings at 300 and 600 revolutions per minute, respectively.
As a preferred embodiment of the method of the present application for simultaneous prediction of rheological parameters of water-based and oil-based drilling fluids, the method comprises: the characteristic parameters comprise drilling fluid density, funnel viscosity, oil phase content and water phase content, the characteristic variables comprise oil-water ratio, and the oil-water ratio is the ratio of the oil phase content to the water phase content.
As a preferred embodiment of the method of the present application for simultaneous prediction of rheological parameters of water-based and oil-based drilling fluids, the method comprises: the processing comprises judging and eliminating abnormal data by adopting a box graph method; complementing the data of the missing item by the average value of two numbers adjacent to the missing value; the duplicated data is deleted directly.
As a preferred embodiment of the method of the present application for simultaneous prediction of rheological parameters of water-based and oil-based drilling fluids, the method comprises: the calculation formula of the spearman rank correlation coefficient is as follows:
wherein R (x) and R (y) represent the number of bits of x and y, respectively,and->Respectively mean bit times.
As a preferred embodiment of the method of the present application for simultaneous prediction of rheological parameters of water-based and oil-based drilling fluids, the method comprises: the random forest model comprises optimization by taking a mean square error MSE as a loss function, and training prediction models of apparent viscosity AV, plastic viscosity PV, flow behavior index n and dynamic shear force YP of drilling fluid respectively, wherein the MSE formula is as follows:
n represents the number of samples and,representing the predicted value of the ith sample, y i Representing the true value of the i-th sample.
As a preferred embodiment of the application, which is applicable to both water-based and oil-based drilling fluid rheological parameter prediction, the application comprises the following steps: the grid search method and the K-fold cross verification method comprise searching optimal super-parameter combinations in the cross verification process aiming at different super-parameter combinations of the model, wherein the super-parameters comprise the number of decision trees, the maximum depth, the minimum sample number of internal node subdivision, the minimum sample number of leaf nodes and the maximum feature number during division.
As a preferred embodiment of the application, which is applicable to both water-based and oil-based drilling fluid rheological parameter prediction, the application comprises the following steps: the K-FOLD cross validation method K-FOLD CV is characterized in that a data set is uniformly divided into K parts, wherein K-1 part is selected as a training set each time, and the rest 1 part is used as a testing set for model training and testing; the Grid Search CV is to perform Grid Search on the hyper-parameters of the random forest model Rf_model, and perform K-fold cross validation on the result.
As a preferred embodiment of the application, which is applicable to both water-based and oil-based drilling fluid rheological parameter prediction, the application comprises the following steps: the R is 2 Represents the ratio of the sum of squares of the regression to the sum of the squares of the total dispersion, R 2 The closer to 1, the more accurate the representation model, the more pronounced the regression effect, R 2 The specific formula is as follows:
wherein n represents the number of samples, y i Representing the true value of the i-th sample,representing the predicted value of the ith sample, +.>Representing an average of the true values;
RMSE represents the square root of the mean of the sum of squares of all errors, the smaller the RMSE, the better the performance of the model, the formula for the RMSE is as follows:
where n represents the number of samples,representing the predicted value of the ith sample, y i Representing the true value of the i-th sample.
The application has the beneficial effects that: the model fully considers the influence of the oil phase content and the water phase content of the drilling fluid on the rheological property of the drilling fluid, constructs a characteristic variable of the oil-water ratio of the drilling fluid, takes the density of the drilling fluid, the viscosity of a funnel and the oil-water ratio as characteristic parameters, realizes the accurate prediction of the apparent viscosity, the plastic viscosity, the flow behavior index and the dynamic shear force of the drilling fluid, can be simultaneously applied to the rheological property prediction of the water-based and oil-based drilling fluid, and overcomes the defect of limited application range of the existing model. Meanwhile, the method effectively improves the prediction efficiency of the drilling fluid rheological property, and solves the problem of inaccurate drilling fluid rheological property prediction caused by frequent adjustment of the drilling fluid.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. Wherein:
FIG. 1 is a flow chart of a model construction of a method of the present application for simultaneous prediction of rheological parameters of water-based and oil-based drilling fluid.
FIG. 2 is a plot of the correlation sequence of the method of the present application as applied to the prediction of rheological parameters of water-based and oil-based drilling fluids.
FIG. 3 is a schematic diagram of a cross-validation process of the method of the present application as applied to the prediction of rheological parameters of water-based and oil-based drilling fluids.
FIG. 4 is a graph comparing predicted and actual values of drilling fluid flow for a method of predicting rheological parameters of water-based and oil-based drilling fluid according to the present application.
FIG. 5 is a comparison of predictive models of considered and unaccounted oil-to-water ratios for a method of the present application for predicting rheological parameters of both water-based and oil-based drilling fluids.
Detailed Description
In order that the above-recited objects, features and advantages of the present application will become more readily apparent, a more particular description of the application will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application, but the present application may be practiced in other ways other than those described herein, and persons skilled in the art will readily appreciate that the present application is not limited to the specific embodiments disclosed below.
Further, reference herein to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic can be included in at least one implementation of the application. The appearances of the phrase "in one embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments.
Further, in describing the embodiments of the present application in detail, the cross-sectional view of the device structure is not partially enlarged to a general scale for convenience of description, and the schematic is only an example, which should not limit the scope of protection of the present application. In addition, the three-dimensional dimensions of length, width and depth should be included in actual fabrication.
Example 1
Referring to fig. 1, for a first embodiment of the present application, a method is provided for simultaneous application to the prediction of rheological parameters of water-based and oil-based drilling fluid, the method steps comprising,
s1: and (5) data collection.
Collecting drilling fluid data from a drilling fluid daily report, wherein the extracted data items comprise: drilling fluid density, funnel viscosity, drilling fluid temperature, drilling fluid oil phase content, drilling fluid water phase content, R300 and R600 values, wherein the R300 and R600 values are readings of a rheometer at 300 rpm and 600 rpm; it should be noted that, in order to build the model accurately, drilling fluid data including water-based, water-in-oil and full oil-based should be collected at the same time.
S2: and (5) target value conversion.
Because the original data only record the reading data of the drilling fluid in the rheometer, the direct rheological performance parameters of the drilling fluid are lacked, and firstly, the method is respectively according to the formula:PV=R600-R300,/>yp=r300—pv converts the values of R300, R600 into apparent viscosity AV, plastic viscosity PV, flow behavior index n, and dynamic shear force YP, which are then used as target parameters for training and predicting the drilling fluid rheological property model.
S3: feature selection and construction.
And establishing a drilling fluid rheological prediction model based on the data of the common drilling fluid site. Selecting drilling fluid density and funnel viscosity as two characteristic parameters; considering that the method is simultaneously suitable for water-based and oil-based drilling fluid rheological property prediction, the characteristic variable of the oil-water ratio, specifically the ratio of the oil phase content to the water phase content, is constructed.
S4: and (5) data processing.
Because the on-site part of drilling fluid data is recorded by engineers, recording errors are not avoided, and the data is required to be processed; judging and eliminating abnormal data by adopting a box graph method; for the data of the default item, the continuity of drilling measurement data is considered, and the parameter variation range of adjacent data is small, so that the average value of two numbers adjacent to the parameter variation range is adopted for complement; for repeated data, adopting a direct deleting method to process the repeated data; in order to ensure the quality of the training process data, the drilling fluid parameters are normalized by adopting a minimum-maximum normalization method.
S5: and (5) analyzing the characteristic correlation.
In order to verify the correlation of the selected features and the drilling fluid rheological parameters, the degree of correlation of the input and output parameters is verified by calculating a spearman rank correlation coefficient, which is calculated as follows:
wherein R (x) and R (y) represent the number of bits of x and y, respectively,and->Respectively mean bit times.
S6: and establishing a random forest model.
Dividing the characteristic data and the target parameters; importing a related python library, building a random forest model and setting related parameters; training out apparent viscosity, plastic viscosity, dynamic shear force and behavior index prediction models of the drilling fluid respectively, wherein the random forest model comprises optimization by taking a mean square error MSE as a loss function, and training out apparent viscosity AV, plastic viscosity PV, flow behavior index n and dynamic shear force YP prediction models of the drilling fluid respectively, wherein the MSE formula is as follows:
n represents the number of samples and,representing the predicted value of the ith sample, y i Representing the true value of the i-th sample.
S7: the optimization method of the model. Searching the optimal super-parameter combination of different models in the cross verification process by adopting a grid searching method and a K-fold cross verification method, so as to optimize the performance and generalization capability of the models; the super parameters comprise the number of decision trees, the maximum depth, the minimum sample number of internal node subdivision, the minimum sample number of leaf nodes and the maximum feature number during division.
S8: and (5) evaluating the model.
R is selected for 2 RMSE index evaluation model, R 2 Represents the ratio of the sum of squares of the regression to the sum of the squares of the total dispersion, R 2 The closer to 1, the more accurate the representation model, the more pronounced the regression effect, R 2 The specific formula is as follows:
wherein n represents the number of samples, y i Representing the true value of the i-th sample,representing the predicted value of the ith sample, +.>Representing an average of the true values;
RMSE represents the square root of the mean of the sum of squares of all errors, the smaller the RMSE, the better the performance of the model, the formula for the RMSE is as follows:
where n represents the number of samples,representing the predicted value of the ith sample, y i Representing the true value of the ith sample, and outputting the optimal super-parameter combination and the prediction result of each drilling fluid rheological model, wherein the super-parameter combination comprises calling a Grid Search CV.best_params_method, and sequentially giving the optimal super-parameter combination of four models; calling the index of the Grid Search CV.best_index to find the optimal parameter combination, calling the Grid Search CV.cv_results_method, and respectively outputting R 2 RMSE index.
In conclusion, the influence of the oil phase content and the water phase content of the drilling fluid on the rheological property of the drilling fluid is considered, and the method can be simultaneously applied to water-based and oil-based drilling fluids; the new model effectively improves the prediction efficiency of the rheological property of the drilling fluid, and simultaneously overcomes the defect of limited application range of the existing model.
Example 2
Referring to fig. 1 to 5, a second embodiment of the present application is different from the first embodiment in that: this example provides a specific example of the prediction method of the present application, and the operation steps are as follows.
S1: and (5) data collection.
Data of drilling fluid performance is collected from the drilling fluid daily report, and the data comprise drilling fluid density, funnel viscosity, drilling fluid temperature, drilling fluid oil phase content, drilling fluid water phase content, solid phase content, R300 and R600 values. The data are shown in table 1.
Table 1 data sheet
Density, g/cm 3 Funnel viscosity, mPa.s Content of aqueous phase% Oil phase content, percent R300 R600
2.40 153 4.0 46 95 171
1.84 65 63.0 7 66 105
1.85 47 68.0 2 49 81
1.85 46 68.0 2 49 81
1.84 49 67.0 2 47 78
S2: and (5) target value conversion.
The rheological parameters of the drilling fluid mainly comprise apparent viscosity AV, plastic viscosity PV, flow behavior index n and dynamic shear force YP, and as the original data only record the reading data of the drilling fluid in a rheometer and the direct rheological performance parameters of the drilling fluid are lacked, the values of R300 and R600 are firstly converted into the apparent viscosity AV, the plastic viscosity PV, the dynamic shear force YP and the flow behavior index n according to the following formulas:
PV=R600-R300YP=R300-PV
wherein: r300 and R600 respectively represent readings of the rheometer at 300 and 600 revolutions per minute, and then the readings are used as target parameters for training and predicting a drilling fluid rheological property model, and training data obtained after formula conversion are shown in Table 2.
TABLE 2 training data after conversion
S3: feature selection and construction.
Based on drilling fluid field data, predicting drilling fluid rheological parameters, and selecting drilling fluid density, viscosity as two characteristic parameters; taking the influence of different relative types of drilling fluid rheological property into consideration, constructing a characteristic variable of oil-water ratio so as to enable a prediction model to be applicable to water-based and oil-based drilling fluid rheological property prediction at the same time; the oil-water ratio is specifically the ratio of the oil phase content to the water phase content in the drilling fluid.
In particular, the ratio of oil to water of the whole oil-based drilling fluid is defined as 1; for all water-based drilling fluid, the oil-water ratio is defined as 0; and obtaining the characteristic parameter of the oil-water ratio according to the ratio of the oil phase content to the water phase content in the drilling fluid.
S4: and (5) data processing.
Because field data is recorded by engineers, recording errors are not avoided, and thus the data needs to be processed underground, specifically: and judging and eliminating the abnormal data by adopting a box graph method. The specific method comprises the following steps: calculating an upper quartile Q3 and a lower quartile Q1 of the data; the quarter bit distance IQR is calculated, i.e., iqr=q3-Q1. Defining an upper limit and a lower limit, wherein the upper limit is Q3+1.5IQR, and the lower limit is Q1-1.5IQR; data smaller than the lower limit or larger than the upper limit is regarded as an outlier and deleted.
For the data of the default item, the continuity of common measurement parameters of drilling is considered, and the parameter variation range of adjacent data is not large, so that the default data is complemented by adopting a method of averaging the front data and the rear data adjacent to the default data.
For repeated data, a direct deleting method is adopted for processing. Meanwhile, in order to ensure the quality of training process data, the preprocessed drilling fluid parameters are normalized by adopting a minimum-maximum normalization method, and a specific formula is shown as followsWherein X is _max Represents the maximum value, X, in the feature _min Representing the minimum in the feature.
S5: and (5) analyzing the characteristic correlation.
To verify the correlation of the selected features and the drilling fluid rheological parameters, the degree of correlation of the input and output parameters is verified by calculating a Spearman rank correlation coefficient. It should be noted that, the spearman rank correlation coefficient is a non-parametric statistical method for measuring the correlation between two variables. It is based on rank information instead of original data values, so that various types of data can be processed, and the value range of the Szelman rank correlation coefficient is [ -1,1]Where 1 represents a complete positive correlation, -1 represents a complete negative correlation, and 0 represents no correlation. Compared with other correlation coefficient methods, the spearman rank correlation coefficient has stronger robustness, can cope with abnormal values and nonlinear relations, and is calculated as shown in a formulaWherein R (x) and R (y) represent the order of x and y, respectively,/->And->Respectively mean bit times.
The method comprises the following specific steps: the "Spearman" was chosen using the Python import pandas data processing package, using the pandas. Corr method. Sequencing the correlation degree between different characteristic variables and each target parameter, as shown in fig. 2, according to fig. 2, the drilling fluid shows stronger directionality to each rheological parameter of the drilling fluid, and the correlation coefficient is greater than 0.74; the viscosity of the drilling fluid hopper and the apparent viscosity of the drilling fluid have larger correlation and the correlation coefficient is 0.70 and 0.68 respectively; the viscosity of the drilling fluid funnel and the shear force of the drilling fluid and the flow behavior index show moderate correlation, and the correlation coefficients are respectively 0.36 and 0.35; the built new characteristic oil-water ratio and each rheological parameter of the drilling fluid also show stronger correlation, and the correlation coefficient is more than 0.45, so that in general, the input and output parameters of the experiment have better correlation.
S6: and (5) model establishment and optimization.
The method comprises the following specific steps: s61: selecting an input parameter x, including density, viscosity and oil-water ratio; defining an output target AV, defining an output target PV, defining an output target YP, and defining an output target n; to further illustrate the construction steps of the predictive model, a specific flow is given in FIG. 1.
S62: introducing a random forest from sklearn. GridSearchCV, KFold is imported from sklearn. Model_selection for super parametric grid search and cross validation, respectively.
S63: a random forest model rf_model is defined, and a parameter criterion= 'squared_error' is set, indicating that the optimization is performed using the mean square error MSE as a loss function.
S64: the optimization of the model adopts an optimization method of grid search and cross verification, comprising searching the optimal combination in the cross verification process aiming at different hyper-parameter combinations of the model, thereby optimizing the performance and generalization capability of the model.
The data set is uniformly divided into K parts, wherein K-1 parts are selected as training sets each time, and the rest 1 parts are used as test sets for model training and testing. The hyper-parameter set to be searched is defined specifically as follows:
params={″n_estimators″:[50,100,200],
″max_depth″:[10,20,30,None],
″min_samples_split″:[2,5,10],
″min_samples_leaf″:[1,2,4],
″max_features″:[″sqrt″,″log2″],
″random_state″:[42]};
wherein, the meaning of the super parameter is shown in table 3:
TABLE 3 hyper-parameter set for random forest models
S65: performing grid search and cross verification to find the optimal super-parameter combination; the K-Fold specific parameters were set as: n_split=5, meaning that the data set is divided into 5 parts uniformly, 4 parts of which are selected as training sets each time, and the remaining 1 part are selected as test sets, and the cross-validation process is shown in fig. 3; setting shuffle=true, indicating that the order is shuffled each time before splitting the dataset; the Grid Search CV parameter is set as: escimer=rf_model, param_grid=params; cv=5; represents a grid search of the hyper-parameters of the random forest model Rf_model and 5-fold cross-validation of the results.
S66: data is imported to train the model; calling a Grid Search CV.fit method, importing x, AV and training a drilling fluid apparent viscosity prediction model; introducing x and PV, and training a drilling fluid plastic viscosity prediction model; introducing x and YP, and training a drilling fluid shearing force prediction model; and (3) introducing x and n, and training a drilling fluid behavior index prediction model.
S7: and (5) evaluating the model.
The model evaluation index selects R 2 RMSE, determining coefficient R 2 Representing regression squaresThe ratio of the sum to the sum of squares of the total dispersion determines the coefficient R 2 The closer to 1, the more accurate the representation model, the more pronounced the regression effect, the formula is shown below; RMSE represents the square root of the mean of the sum of squares of all errors, the smaller the RMSE, the better the performance of the model is given by the formula,wherein n represents the number of samples, +.>Representing the predicted value of the ith sample, y i Representing the true value of the i-th sample.
S8: and outputting the optimal super-parameter combination and the prediction result.
The super-parameter combination comprises the steps of calling a Grid Search CV.best_params_method and sequentially giving the optimal super-parameter combination of four models; grid Search CV.best_index_found index of optimal parameter combination, call Grid Search CV.cv_results_method, and output R respectively 2 RMSE index; the best hyper-parametric combinations and output results for the four models of this example are shown in table 4, and the predicted and actual pairs of drilling fluid flow changes are shown in fig. 4.
Table 4 optimal superparameter combinations and evaluation index for each model
In fig. 4, predicted and actual values for various rheological parameters of the drilling fluid are fitted.
The x axis corresponding to the scattered points is the true value of each rheological parameter of the drilling fluid, the y axis corresponding to the scattered points is the prediction of each rheological parameter of the drilling fluid, and the broken line represents the condition that the predicted value is equal to the true value. The closer the scattered points are to the broken line, the more accurate the prediction and the better the fitting degree.
As can be seen from fig. 4, under the condition of fully considering the oil-water ratio of the drilling fluid, the prediction of the rheological parameter of the drilling fluid can be realized by using a random forest integrated learning method; apparent viscosity of drilling fluidThe coefficient R is determined in the predictive model of the degree and the plastic viscosity, namely A, B chart of FIG. 4 2 The mean square error is kept at about 21 and reaches 0.96, so that a good prediction effect is achieved. The coefficient R is determined in the drilling fluid tangential force and flow direction behavior index prediction model, namely C, D chart of FIG. 4 2 0.87 and 0.90 respectively, and the mean square error is smaller, thus meeting the requirement of on-site data accuracy.
Model comparison: to demonstrate the effect of increasing oil-to-water ratio on wellbore fluid rheology, a comparative experiment was designed as follows: and after the characteristic variable of the oil-water ratio is removed by using the basic data for establishing the model, a random forest model is established by using the drilling fluid density and viscosity as characteristic variables by using the same method. For ease of comparison, the decision coefficient R is selected 2 As an evaluation index, the experimental result and the experimental result considering the oil-water ratio were compared as shown in fig. 5.
When the oil-water ratio is not considered, under the condition that the drilling fluid type is frequently adjusted, if the same model is still used for predicting the rheological property of the drilling fluid, larger errors can be generated, and even the method cannot be applied; as can be seen from fig. 5, the apparent viscosity, plastic viscosity, dynamic shear force and flow behavior index of the drilling fluid are very low in prediction accuracy, and the determination coefficients of the models are between 0.7 and 0.77, so that the field requirements cannot be met; the new method considers the characteristic of oil-water ratio, still has very high accuracy under the condition of frequent adjustment of drilling fluid types, and the decision coefficient of each model is between 0.87 and 0.97, so that a satisfactory result is achieved.
In summary, the application provides a random forest-based drilling fluid rheological property prediction model, which fully considers the influence of the oil phase content and the water phase content of drilling fluid on the drilling fluid rheological property, constructs a characteristic variable of the oil-water ratio of the drilling fluid, realizes accurate prediction of the apparent viscosity, the plastic viscosity, the dynamic shear force and the flow behavior index of the drilling fluid by using three characteristic parameters of the density, the funnel viscosity and the oil-water ratio of the drilling fluid, and can be simultaneously applied to rheological property prediction of water-based and oil-based drilling fluids. The method can effectively improve the prediction efficiency of the drilling fluid rheological property, solves the problem of inaccurate drilling fluid rheological property prediction caused by frequent adjustment of the drilling fluid, and has great significance in promoting the automation of a drilling fluid system.
It should be noted that the above embodiments are only for illustrating the technical solution of the present application and not for limiting the same, and although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solution of the present application may be modified or substituted without departing from the spirit and scope of the technical solution of the present application, which is intended to be covered in the scope of the claims of the present application.

Claims (10)

1. A method for predicting rheological parameters of water-based and oil-based drilling fluid, which is characterized by comprising the following steps: the method comprises the following specific steps:
collecting drilling fluid performance data from a drilling fluid daily report;
converting part of the data into target parameters of a drilling fluid rheological property prediction model;
determining characteristic parameters from the collected data, and constructing characteristic variables of a prediction model;
processing the data by adopting different methods;
verifying the correlation of the selected characteristic parameters and the characteristic variables by calculating the spearman rank correlation coefficient;
dividing the characteristic parameters and the target parameters to construct a random forest model;
optimizing the model by adopting a grid search method and a K-fold cross validation method;
r is selected for 2 And (3) obtaining an optimal hyper-parameter combination and a prediction result by using the RMSE index evaluation model.
2. A method for simultaneous adaptive water-based, oil-based drilling fluid rheological parameter prediction as claimed in claim 1 wherein: the data includes drilling fluid density, funnel viscosity, drilling fluid temperature, drilling fluid oil phase content, drilling fluid water phase content, values of R300 and R600, including drilling fluids comprising water-based, water-in-oil, and whole oil-based, respectively.
3. A method for simultaneous adaptive water-based, oil-based drilling fluid rheological parameter prediction as claimed in claim 2, wherein: the partial data includes values of R300 and R600, and the target parameters include apparent viscosity AV, plastic viscosity PV, dynamic shear force YP, and flow behavior index n, converted according to the following formula:
PV=R600-R300
YP=R300-PV
where R300 and R600 represent the rheometer readings at 300 and 600 revolutions per minute, respectively.
4. A method for simultaneous adaptive water-based, oil-based drilling fluid rheological parameter prediction as claimed in claim 3 wherein: the characteristic parameters comprise drilling fluid density, funnel viscosity, oil phase content and water phase content, the characteristic variables comprise oil-water ratio, and the oil-water ratio is the ratio of the oil phase content to the water phase content.
5. The method for simultaneous adaptive water-based, oil-based drilling fluid rheological parameter prediction according to claim 4, wherein: the processing comprises judging and eliminating abnormal data by adopting a box graph method; complementing the data of the missing item by the average value of two numbers adjacent to the missing value; the duplicated data is deleted directly.
6. The method for simultaneous adaptive water-based, oil-based drilling fluid rheological parameter prediction according to claim 5, wherein: the calculation formula of the spearman rank correlation coefficient is as follows:
wherein R (x) and R (y) represent the number of bits of x and y, respectively,and->Respectively mean bit times.
7. The method simultaneously applicable to prediction of rheological parameters of water-based and oil-based drilling fluid according to claim 6, wherein: the random forest model comprises optimization by taking a mean square error MSE as a loss function, and training prediction models of apparent viscosity AV, plastic viscosity PV, flow behavior index n and dynamic shear force YP of drilling fluid respectively, wherein the MSE formula is as follows:
n represents the number of samples and,representing the predicted value of the ith sample, y i Representing the true value of the i-th sample.
8. The method of simultaneous adaptive water-based and oil-based drilling fluid rheological parameter prediction according to claim 7 wherein: the grid search method and the K-fold cross verification method comprise searching optimal super-parameter combinations in the cross verification process aiming at different super-parameter combinations of the model, wherein the super-parameters comprise the number of decision trees, the maximum depth, the minimum sample number of internal node subdivision, the minimum sample number of leaf nodes and the maximum feature number during division.
9. The method simultaneously applicable to prediction of rheological parameters of water-based and oil-based drilling fluid according to claim 8 wherein: the K-FOLD cross validation method K-FOLD CV is characterized in that a data set is uniformly divided into K parts, wherein K-1 part is selected as a training set each time, and the remaining 1 part is used as a testing set for model training and testing; the Grid Search CV is to perform Grid Search on the hyper-parameters of the random forest model Rf_model, and perform K-fold cross validation on the result.
10. The method simultaneously adapted for use in predicting a rheological parameter of a water-based, oil-based well drilling fluid of claim 9, wherein: the R is 2 Represents the ratio of the sum of squares of the regression to the sum of the squares of the total dispersion, R 2 The closer to 1, the more accurate the representation model, the more pronounced the regression effect, R 2 The specific formula is as follows:
wherein n represents the number of samples, y i Representing the true value of the i-th sample,representing the predicted value of the ith sample, +.>Representing an average of the true values;
RMSE represents the square root of the mean of the sum of squares of all errors, the smaller the RMSE, the better the performance of the model, the formula for the RMSE is as follows:
where n represents the number of samples,representing the predicted value of the ith sample, yi represents the true value of the ith sample.
CN202310464487.8A 2023-04-26 2023-04-26 Method simultaneously suitable for predicting rheological parameters of water-based and oil-based drilling fluid Pending CN116702944A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310464487.8A CN116702944A (en) 2023-04-26 2023-04-26 Method simultaneously suitable for predicting rheological parameters of water-based and oil-based drilling fluid

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310464487.8A CN116702944A (en) 2023-04-26 2023-04-26 Method simultaneously suitable for predicting rheological parameters of water-based and oil-based drilling fluid

Publications (1)

Publication Number Publication Date
CN116702944A true CN116702944A (en) 2023-09-05

Family

ID=87844179

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310464487.8A Pending CN116702944A (en) 2023-04-26 2023-04-26 Method simultaneously suitable for predicting rheological parameters of water-based and oil-based drilling fluid

Country Status (1)

Country Link
CN (1) CN116702944A (en)

Similar Documents

Publication Publication Date Title
CN112901137B (en) Deep well drilling mechanical drilling speed prediction method based on deep neural network Sequential model
CN111291097B (en) Drilling leaking layer position real-time prediction method based on decision tree data mining
CN104533400B (en) Method for reconstructing logging curve
CN110346831B (en) Intelligent seismic fluid identification method based on random forest algorithm
CN114358434A (en) Drilling machine drilling speed prediction method based on LSTM recurrent neural network model
CN113987033A (en) Main transformer online monitoring data group deviation identification and calibration method
CN116644284A (en) Stratum classification characteristic factor determining method, system, electronic equipment and medium
CN115293197A (en) Borehole strain data anomaly detection method based on long-term and short-term memory network
CN116702944A (en) Method simultaneously suitable for predicting rheological parameters of water-based and oil-based drilling fluid
Salakhov et al. A field-proven methodology for real-time drill bit condition assessment and drilling performance optimization
CN116776717A (en) Drilling parameter multi-objective dynamic optimization method based on improved NSGA-III algorithm
CN111751878A (en) Method and device for predicting transverse wave velocity
CN114818493A (en) Method for quantitatively evaluating integrity degree of tunnel rock mass
CN110032777B (en) Drilling fluid density safety window estimation method based on uncertainty analysis
CN115329468A (en) Drilling machine drilling speed prediction method for improving BP neural network based on BAS algorithm
CN111706323A (en) Water flooded layer fine interpretation and evaluation method based on GWO-LSSVM algorithm
Fernández Berrocal et al. Evaluation and Interpretation on Data Driven ROP Models From Engineering Perspectives
CN117540277B (en) Lost circulation early warning method based on WGAN-GP-TabNet algorithm
CN116451812B (en) Wettability prediction method and device based on multi-granularity cascade forest and super-parameter optimization
CN114279914B (en) Method and equipment for measuring sand content of drilling fluid based on neural network
CN117725842B (en) Shield tunneling induced stratum settlement prediction method based on transfer learning
WO2024040801A1 (en) Transverse wave time difference prediction method and apparatus
Li et al. A systematic review of machine learning modeling processes and applications in ROP prediction in the past decade
CN117688465A (en) Mechanical drilling speed prediction method and system
CN115345352A (en) Oil well oil production prediction method based on CNN-Transformer

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination