Throttle valve control method and device based on incremental learning, equipment and medium
The incremental learning-based throttle valve control method automatically adjusts the throttle valve opening using XGBoost and random forest models, solving the problems of insufficient control speed and accuracy in existing technologies and achieving efficient and safe control of the drilling process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA NAT PETROLEUM CORP
- Filing Date
- 2024-11-04
- Publication Date
- 2026-05-08
AI Technical Summary
Existing throttle valve control technology is difficult to adjust the valve opening quickly and accurately, relying on human experience. Furthermore, changes in valve characteristics lead to insufficient control precision and repeatability, affecting the safety and efficiency of drilling operations.
An incremental learning-based throttle valve control method is adopted. The XGBoost model and incremental learning are used to update the model. Real-time parameters are collected and preprocessed to filter features. A random forest model is constructed to calculate the importance of features. The model parameters are updated by combining Wasserstein distance and root mean square error to achieve automatic adjustment of valve opening.
It improves the accuracy and speed of throttle valve control, reduces reliance on operator experience, enhances the safety and efficiency of drilling pressure control, adapts to changes in valve performance, and ensures accurate prediction of valve opening under different conditions.
Smart Images

Figure CN121995741A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of oil and gas, and more specifically, to a throttle valve control method based on incremental learning, a throttle valve control device based on incremental learning, and an apparatus and computer-readable storage medium for implementing the throttle valve control method based on incremental learning. Background Technology
[0002] With the continuous advancement of oil drilling and production technologies, drilling into complex formations is becoming increasingly common. These formations typically have narrow safe drilling density windows, demanding higher precision in drilling techniques. Controlled pressure drilling (CPD) technology, due to its ability to precisely control bottom hole pressure, has become a key technology for addressing these challenges. Therefore, effectively improving the controllability of the drilling process can significantly reduce the probability of accidents. In controlled pressure drilling systems, the surface choke manifold plays a crucial role as a core well control device. The choke valve within it is the core device for controlling fluid flow and maintaining ideal casing pressure, directly affecting the stability of bottom hole pressure and the safety of drilling operations.
[0003] Currently, throttle valve control technology mainly employs opening degree control or casing pressure control methods. However, these traditional methods face several challenges. First, conventional PID control algorithms struggle to quickly and accurately adjust the valve to the ideal position, especially in situations requiring rapid response. This insufficient adjustment speed can lead to operational delays, impacting the safety and efficiency of the entire drilling operation. Second, valve opening decisions largely rely on the experience and judgment of on-site engineers, increasing the risk of human error and limiting control accuracy and repeatability. Third, valve characteristics may change over time and with continuous use, such as due to wear, corrosion, or deposit accumulation, further increasing the difficulty of precise control using traditional methods. Therefore, developing a new automatic control method is particularly important to achieve automatic adjustment of valve settings based on real-time data. Summary of the Invention
[0004] The purpose of this invention is to address at least one of the aforementioned shortcomings of the prior art. For example, one objective of this invention is to provide an incremental learning-based throttle valve control method that can quickly achieve ideal sleeve pressure and automatically adjust the opening of the throttle valve.
[0005] To achieve the above objectives, the present invention provides a throttle valve control method based on incremental learning.
[0006] The throttle valve control method based on incremental learning includes the following steps:
[0007] Collect real-time parameters of the throttle valve during drilling, including at least the outlet flow rate, temperature, density, throttle valve opening degree, and measured casing pressure.
[0008] The pre-trained XGBoost model is applied to the drilling parameters to obtain the predicted opening of the throttle valve. When the performance evaluation of the XGBoost model deteriorates or the distribution distance of the real-time parameters of the throttle valve exceeds a preset threshold, the XGBoost model is updated according to the real-time parameters.
[0009] In an exemplary embodiment of the throttle valve control method based on incremental learning of the present invention, the pre-training may include:
[0010] It can collect the valve opening degree corresponding to different target sleeve pressures and the parameter data of one or more sets of throttle valves corresponding to the valve opening degree.
[0011] The parameter data of the throttle valve can be preprocessed, and the preprocessing may include: filtering the input data of the XGBoost model based on the influence of the parameter data of the throttle valve on the valve opening.
[0012] The preprocessed parameter data can be divided into training datasets and test datasets, and the XGBoost model can be trained and evaluated based on the training datasets and test datasets.
[0013] In an exemplary embodiment of the throttle valve control method based on incremental learning of the present invention, the preprocessing may further include:
[0014] A random forest model can be constructed, and the parameter data of the throttle valve can be applied to the random forest model.
[0015] The overall importance score of the features of the random forest model can be calculated and ranked using the random forest model.
[0016] The input data for the XGBoost model can be confirmed based on the sorting.
[0017] In an exemplary embodiment of the throttle valve control method based on incremental learning of the present invention, the calculation of the overall importance score may include:
[0018] The feature contribution value can be obtained by calculating the difference between the average variances of the parent and child nodes generated by each split of the features of the random forest model.
[0019] The overall importance score can be obtained by averaging and normalizing the feature contribution values.
[0020] In an exemplary embodiment of the throttle valve control method based on incremental learning of the present invention, the formula for calculating the feature contribution value can be:
[0021]
[0022] In equation (1), y i This can be the measured throttle valve opening. The value of MSE can be the predicted opening of the throttle valve in the XGBoost model; n can be the total number of samples; MSE parent It can be the mean square error of the parent node; MSE left child and MSE right child can be the average variance of the left and right child nodes after splitting; pL and pR can be the sample proportions of the left and right subtrees, respectively.
[0023] In an exemplary embodiment of the throttle valve control method based on incremental learning of the present invention, the formula for calculating the performance degradation of the XGBoost model can be:
[0024]
[0025] In equation (2), RMSE can be the root mean square error of the XGBoost model; y i This can be the measured throttle valve opening. can be the predicted opening degree of the throttle valve in the XGBoost model; n can be the total number of samples.
[0026] The formula for calculating the distribution distance of the real-time parameters of the throttle valve can be:
[0027] D(P,Q)=inf γ∈Γ(P,Q) E (x,y)~γ [||xy||]. Equation (3)
[0028] In equation (3), P and Q can be the probability distributions of the old and new data, respectively; inf can be the maximum lower bound; E (x,y)~γ [||xy||] can be the expected value of the movement cost (i.e. the distance from x to y) from P to Q under the joint distribution γ.
[0029] In an exemplary embodiment of the throttle valve control method based on incremental learning of the present invention, when updating the XGBoost model according to the real-time parameters, the calculation formula for the parameter update of the XGBoost model can be:
[0030]
[0031] In equation (4), θ old and θ new These can be the parameters of the XGBoost model before and after the update; α can be the learning rate. This can be used for new data D new The gradient of the loss function.
[0032] Another aspect of the present invention provides a throttle valve control device based on incremental learning.
[0033] The incremental learning-based throttle valve control device includes a connected real-time parameter collection module and a throttle valve opening prediction module.
[0034] The real-time parameter collection module is configured to collect real-time parameters of the throttle valve during drilling. These real-time parameters include at least the outlet flow rate, temperature, density, throttle valve opening degree, and measured casing pressure.
[0035] The throttle valve opening prediction module is configured to apply a pre-trained XGBoost model to the drilling parameters to obtain the predicted opening of the throttle valve. When the performance evaluation of the XGBoost model deteriorates or the distribution distance of the real-time parameters of the throttle valve exceeds a preset threshold, the XGBoost model is updated according to the real-time parameters.
[0036] In another aspect, the present invention provides a computer device, the computer device comprising:
[0037] The processor; the memory, which stores a computer program that, when executed by the processor, implements the incremental learning-based throttle valve control method described above.
[0038] In another aspect, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the incremental learning-based throttle valve control method described above.
[0039] Compared with the prior art, the beneficial effects of the present invention include at least one of the following:
[0040] (1) The incremental learning-based throttle valve control method of the present invention effectively improves the accuracy and speed of throttle valve control, reduces the dependence on operator experience, significantly improves the overall safety and efficiency of drilling pressure control, and further achieves the purpose of rapidly adjusting casing pressure and laying the foundation for intelligent pressure control.
[0041] (2) The throttle valve control method based on incremental learning of the present invention integrates the basic XGBoost model and incremental learning technology to process new throttle valve data, so that the model can be updated directly when new data arrives without retraining. This not only improves the accuracy of valve opening prediction, but also continuously adapts to changes in valve performance. Furthermore, the model performance can be optimized by adjusting the model's hyperparameters, so that it can adapt to valve characteristics over time and accurately predict the valve opening corresponding to the target sleeve pressure under different temperatures, flow rates and pressures. Attached Figure Description
[0042] The above and other objects and / or features of the present invention will become clearer from the following description taken in conjunction with the accompanying drawings, in which:
[0043] Figure 1 A flowchart illustrating an exemplary embodiment of the incremental learning-based throttle valve control method of the present invention is shown.
[0044] Figure 2 A schematic diagram of the apparatus connection is shown for an exemplary embodiment of the throttle valve control method based on incremental learning of the present invention.
[0045] Explanation of reference numerals in the attached figures:
[0046] 100 - Real-time parameter collection module; 110 - Throttling valve opening prediction module. Detailed Implementation
[0047] In the following sections, the incremental learning-based throttle valve control method, apparatus, device, and medium of the present invention will be described in detail with reference to exemplary embodiments.
[0048] It should be noted that the terms “S1”, “S2”, “S3”, etc., used in this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0049] In practical applications, throttle valves need to precisely adjust fluid flow to maintain or achieve specific casing pressures. However, the response speed and control accuracy of many current throttle valves do not fully meet actual requirements, resulting in excessively long times to reach the ideal casing pressure. This not only affects production efficiency but may also cause unnecessary damage to equipment and processes. Relying on experts in the long term not only increases labor costs but may also lead to unstable control results due to individual differences and uncertainties in expert experience. To address these issues, the inventors propose a throttle valve control method based on incremental learning, which utilizes an XGBoost model and an incremental learning update model to optimize the response speed and control accuracy of the throttle valve.
[0050] Exemplary Example 1
[0051] In this exemplary embodiment, as Figure 1 As shown, the throttle valve control method based on incremental learning includes the following steps:
[0052] S1. Collect real-time parameters of the throttle valve during drilling. The real-time parameters include at least the outlet flow rate, temperature, density, throttle valve opening degree, and measured casing pressure.
[0053] Optionally, real-time parameters are various drilling parameters under conditions of displacement but no gas flow, including outlet flow rate, temperature, density, throttle valve opening, and measured casing pressure.
[0054] S11. Identify and remove outliers in the real-time parameters, and standardize the real-time data. Convert the processed data into a format compatible with the feature representation used during pre-training to ensure that newly collected real-time data can be seamlessly applied to the existing XGboost model.
[0055] S2. Apply the pre-trained XGBoost model to the drilling parameters to obtain the predicted opening of the throttle valve. When the performance evaluation of the XGBoost model deteriorates or the distribution distance of the real-time parameters of the throttle valve exceeds a preset threshold, update the XGBoost model according to the real-time parameters.
[0056] S21. It can collect the valve opening degree corresponding to different target sleeve pressures and the parameter data of one or more sets of throttle valves corresponding to the valve opening degree.
[0057] Optionally, parameter data of a throttle valve can be collected by setting up experiments to obtain the valve opening required to achieve the target sleeve pressure under different throttle valve parameters.
[0058] Optionally, the parameter data of the throttle valve may include: date, time, set pressure, measured pressure, pressure at the first monitoring point, pressure at the second monitoring point, pressure at the third monitoring point, torque, valve opening, outlet flow rate, temperature, density, cumulative flow rate, and gas flow rate.
[0059] S22. The parameter data of the throttle valve can be preprocessed. The preprocessing may include: filtering the input data of the XGBoost model based on the influence of the parameter data of the throttle valve on the valve opening.
[0060] Optionally, preprocessing may also include: removing missing, outlier, and duplicate values from the parameter data of the throttle valve in the throttle valve experiment, and deleting throttle valve data with no flow or containing gas flow during the experiment.
[0061] S221. Construct a random forest model, which can apply the parameter data of the throttle valve to the random forest model.
[0062] More specifically, a certain number of decision trees are constructed using the random forest algorithm, for example, 10 decision trees. Each tree is constructed by randomly sampling from the original dataset (the parameter data of the throttle valve). During the construction of the tree, the split of each node is based on the optimal selection of the feature subset.
[0063] S222: The overall importance score of the features of the random forest model can be calculated and ranked using the random forest model.
[0064] In random forest models, calculating the Variable Importance Measure (VIM) is a method to measure the impact of each feature on the model's predictive performance. It can be evaluated by observing the degree to which each feature reduces the model's prediction error. This exemplary embodiment primarily focuses on how each feature affects the model's Mean Squared Error (MSE).
[0065] S2221. The feature contribution value can be obtained by calculating the difference between the average variance of the parent node and the child node produced by each split of the features of the random forest model.
[0066] More specifically, when constructing a decision tree, each time a split is performed using a certain feature, the reduction in overall MSE due to this split is calculated. This reduction is the feature contribution value, determined by comparing the MSE of the nodes before and after the split. The MSE calculation formula is as follows:
[0067]
[0068] In equation (1), y i This can be the measured throttle valve opening. can be the predicted opening degree of the throttle valve in the XGBoost model; n can be the total number of samples.
[0069] The formula for calculating the characteristic contribution value can be:
[0070] ΔMSE=MSE parent -(pL·MSE left child +pR·MSE right child Equation (2)
[0071] In equation (2), MSE parent It can be the mean square error of the parent node; MSE left child and MSE right child can be the average variance of the left and right child nodes after splitting; pL and pR can be the sample proportions of the left and right subtrees, respectively.
[0072] S2222. By accumulating, averaging, and normalizing the feature contribution values, the overall importance score can be obtained.
[0073] S223. The input data of the XGBoost model can be confirmed based on the sorting.
[0074] More specifically, all features are sorted from highest to lowest importance score. This clarifies which features have a greater impact on predicting valve opening. Ultimately, this exemplary embodiment selects the valve torque, outlet flow rate, temperature, density, and measured sleeve pressure parameters—the features with the highest importance ranking—as the input data for the XGBoost model, and the valve opening as the output data.
[0075] By performing standardized preprocessing on parameter data, the influence of different measurement scales can be eliminated, ensuring data consistency and comparability.
[0076] S23. The preprocessed parameter data can be divided into training dataset and test dataset, and the XGBoost model can be trained and evaluated based on the training dataset and test dataset.
[0077] More specifically, the ratio of training dataset to test dataset can be 8:2.
[0078] Optionally, training and validation sets with different valve openings can be used to train and evaluate the XGBoost model, resulting in an initial XGBoost model. The output of the model is the throttle valve position for the target sleeve pressure, and this model will serve as the starting point for incremental learning.
[0079] XGBoost (Extreme Gradient Boosting) is an efficient and high-performance gradient boosting framework, whose main advantages lie in its high execution speed and accurate prediction capabilities. The basic idea of the XGBoost model is to predict the target variable by constructing a series of decision trees, iteratively reducing the model's prediction error. In each iteration, a new tree f is created. t (x) is added to the model to correct for the prediction residuals of all previous trees. The model update follows the formula:
[0080]
[0081] In equation (3), , respectively, represent the model predictions at round t and round t-1; η is the learning rate, used to adjust the contribution of each tree to the final prediction; f t (x) represents the new decision tree.
[0082] The objective function of XGBoost optimization consists of two parts: a loss function for the training data and a regularization term for model complexity. The overall objective function is as follows:
[0083]
[0084] In equations (4) to (5), Obj is the overall objective function; The loss function; Ω(f) k ) represents the complexity penalty term for the k-th tree, designed to control model complexity and mitigate overfitting; T is the number of leaf nodes in the tree, ω j is the weight of the leaf node, γ and λ are the regularization parameters that control the tree complexity and leaf weight penalty, respectively; n is the total number of samples in the training set; i is the i-th sample in the training set; K is the total number of decision trees; j is the j-th leaf node in the k-th decision tree.
[0085] Optionally, to ensure the XGBoost model remains efficient and accurate as the data changes, its update mechanism may include:
[0086] XGBoost model update frequency: The update frequency of the XGBoost model can be manually set based on the data accumulation rate, the dynamic nature of the operating environment, and the on-site drilling conditions. For example, it can be set to evaluate once a week to determine whether to update the model.
[0087] Conditions that trigger an update to the XGBoost model may include:
[0088] Optionally, if the root mean square error (RMSE) of the model exceeds a predetermined threshold in consecutive evaluation periods, it indicates a decline in the model's predictive ability. The formula for calculating the degree of performance degradation of the XGBoost model can be:
[0089]
[0090] In equation (6), RMSE can be the root mean square error of the XGBoost model; y i This can be the measured throttle valve opening. can be the predicted opening degree of the throttle valve in the XGBoost model; n can be the total number of samples.
[0091] Optionally, the difference in statistical characteristics between new and training data can be quantified by monitoring the Wasserstein distance (bulldozer distance) of the throttle valve data distribution. If a significant change in data distribution exceeding a set threshold is detected, it is considered a significant change in data distribution, triggering an update. Therefore, the formula for calculating the distribution distance of the real-time parameters of the throttle valve can be:
[0092] D(P,Q)=inf γ∈Γ(P,Q) E (x,y)~γ [||xy||] Equation (7)
[0093] In equation (7), D(P,Q) can be the distribution distance of the real-time parameters of the throttle valve; P and Q can be the probability distributions of the old and new data, respectively; inf can be the maximum lower bound; E (x,y)~γ [||xy||] can be the expected value of the movement cost (i.e. the distance from x to y) from P to Q under the joint distribution γ.
[0094] The update process of the XGBoost model:
[0095] If the performance of the XGBoost model begins to decline on a new dataset or the data distribution changes, instead of retraining a new model, the existing model will be updated with the new data. This incremental learning strategy allows the model to gradually integrate new information and adjust its internal structure and parameters to adapt to data changes.
[0096] More specifically, when updating the XGBoost model based on real-time parameters, the formula for calculating the parameter update of the XGBoost model can be:
[0097]
[0098] In equation (8), θ old and θ new These can be the parameters of the XGBoost model before and after the update; α can be the learning rate. This can be used for new data D new The gradient of the loss function.
[0099] Optionally, after a successful model update, the updated model will be used to predict the throttle valve opening in real time to ensure that the target pressure is achieved under various operating conditions. This process involves inputting collected throttle valve data, such as flow rate, pressure, and temperature, into the model after necessary preprocessing. The model predicts the required throttle valve opening based on these parameters, and the output will directly guide field operators in making adjustments. In this way, not only can the safety and efficiency of operations be optimized, but the model's performance can also be continuously monitored and evaluated to ensure its long-term accuracy and reliability.
[0100] Exemplary Example 2
[0101] This exemplary embodiment provides a throttle valve control device based on incremental learning. For example... Figure 2 As shown, the throttle valve control device based on incremental learning includes a connected real-time parameter collection module 100 and a throttle valve opening prediction module 110.
[0102] The real-time parameter collection module 100 is configured to collect real-time parameters of the throttle valve during drilling. The real-time parameters include at least the outlet flow rate, temperature, density, throttle valve opening degree, and measured casing pressure.
[0103] The throttle valve opening prediction module 110 is configured to apply a pre-trained XGBoost model to the drilling parameters to obtain the predicted opening of the throttle valve, wherein the XGBoost model is updated according to the real-time parameters when the performance evaluation of the XGBoost model deteriorates or the distribution distance of the real-time parameters of the throttle valve exceeds a preset threshold.
[0104] Exemplary Example 3
[0105] This exemplary embodiment provides a computer device. The computer device includes a processor and a memory. The memory is used to store a computer program. The computer program is executed by the processor, causing the processor to execute the computer program of the incremental learning-based throttle valve control method according to this exemplary embodiment 1.
[0106] Exemplary Example 4
[0107] This exemplary embodiment provides a computer-readable storage medium storing a computer program. The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform a throttle control method based on incremental learning according to Exemplary Embodiment 1. The computer-readable recording medium is any data storage device capable of storing data read from a computer system. Examples of computer-readable recording media include: read-only memory, random access memory, read-only optical disc, magnetic tape, floppy disk, optical data storage device, and carrier waves (such as data transmission via the Internet through wired or wireless transmission paths).
[0108] To better understand the exemplary embodiments of the present invention described above, further descriptions are provided below with reference to specific examples, but the examples given are not intended to limit the present invention.
[0109] Example 1
[0110] In this embodiment, the throttle valve control method based on incremental learning can be implemented through the following steps:
[0111] Includes the following steps:
[0112] S1. Data from 5000 throttle valves were collected through field experiments, detailing the valve opening required to achieve the target casing pressure under different throttle valve parameters for branch a. The outlet flow rate ranged from 0 to 30 L / s, the casing pressure was controlled between 0 and 6 MPa, and the outlet density ranged from 1 to 2.3 g / cm³. 3 The raw data structure of the throttle valve collected is shown in Table 1:
[0113] Table 1 Throttling Valve Data Structure Table
[0114]
[0115] S2. Preprocess the throttle valve data collected in the experiment, including the following sub-steps:
[0116] S21. Remove missing and duplicate values from the throttle valve experimental data. Use 3 Sigma detection to detect and delete outliers. Also, delete throttle valve data with no flow or containing gas flow during the experiment.
[0117] S22. Calculate the importance of the throttle valve data parameter characteristics:
[0118] a) Construct a number of decision trees using the random forest algorithm. Each tree is constructed by randomly sampling from the original dataset (bootstrap sampling). During tree construction, the splitting of each node is based on the optimal selection of a subset of features.
[0119] b) Calculating the reduction in MSE: When constructing a decision tree, each time a feature is used for splitting, the reduction in overall MSE is calculated. This reduction is determined by comparing the MSE of the nodes before and after the split. The MSE calculation formula is shown below:
[0120]
[0121] In equation (1), y i This can be the measured throttle valve opening. can be the predicted opening degree of the throttle valve in the XGBoost model; n can be the total number of samples.
[0122] c) Calculate the contribution value of the feature, using the following formula:
[0123] ΔMSE=MSE parent -(pL·MSE left child +pR·MSE right child Equation (2)
[0124] In equation (2), MSE parent It can be the mean square error of the parent node; MSE left child and MSE right child can be the average variance of the left and right child nodes after splitting; pL and pR can be the sample proportions of the left and right subtrees, respectively.
[0125] d) Aggregate feature importance: For each feature, calculate the MSE reduction on all trees in the random forest, perform cumulative averaging and normalization, and obtain the overall importance score of the feature.
[0126] e) Feature Importance Ranking: Sort all features according to their importance scores from highest to lowest. Finally, select the valve torque, outlet flow rate, temperature, density, and measured sleeve pressure parameters with the highest feature importance ranking as model inputs, and valve opening as output.
[0127] S23. Use the StandardScaler class to standardize the throttle valve data, and divide the processed data into training and testing datasets with a ratio of 8:2. The processed datasets are shown in Table 2.
[0128] Table 2 Dataset Table
[0129] Valve opening Actual sleeve pressure torque Export flow temperature density 0.3 -0.069976 0.011098 -3.557177 -4.187489 0.601687 0.3558 2.311043 14.627238 -3.541425 -4.189476 0.6021 0.8500 0.435089 0.675468 0.665967 0.923952 -0.05021
[0130] S3. Constructing the initial model: The XGBoost model is trained and evaluated using the training and validation sets obtained in S22 under different valve openings to obtain the initial XGBoost model. The model output is the throttle valve position for the target sleeve pressure. This model will serve as the starting point for incremental learning.
[0131] In each iteration, the new tree f t (x) is added to the model to correct for the prediction residuals of all previous trees. The model update follows the formula:
[0132]
[0133] In equation (3), , respectively, represent the model predictions at round t and round t-1; η is the learning rate, used to adjust the contribution of each tree to the final prediction; f t (x) represents the new decision tree.
[0134] The objective function of XGBoost optimization consists of two parts: a loss function for the training data and a regularization term for model complexity. The overall objective function is as follows:
[0135]
[0136] In equations (4) to (5), Obj is the overall objective function; The loss function; Ω(f) k ) represents the complexity penalty term for the k-th tree, designed to control model complexity and mitigate overfitting; T is the number of leaf nodes in the tree, ω j is the weight of the leaf node, γ and λ are the regularization parameters that control the tree complexity and leaf weight penalty, respectively; n is the total number of samples in the training set; i is the i-th sample in the training set; K is the total number of decision trees; j is the j-th leaf node in the k-th decision tree.
[0137] S4. Collect real-time parameters of valve a at a drilling site in a certain area from December 11, 2023 to January 8, 2024, including but not limited to outlet flow rate, temperature, density, and measured casing pressure. This is especially important when there is discharge but no gas flow. This data is collected directly by sensors and transmitted to a data processing center via a secure network. Possible outliers are identified and removed, and the real-time data is standardized, converting it into a format compatible with the feature representation used during initial training.
[0138] S5. Send the real-time data into the updated model. The detailed process is as follows:
[0139] S51. Divide the collected data into four weeks according to time, and input the data into the model sequentially in chronological order. Evaluate whether to update the model each week based on real-time data and prediction results.
[0140] S52. Conditions for triggering an update: The update of the model is triggered based on one of the following conditions:
[0141] a) Performance decline: When the root mean square error (RMSE) of the model exceeds a predetermined threshold in consecutive evaluation periods, it indicates a decline in the model's predictive ability. The RMSE calculation formula is shown below:
[0142]
[0143] In equation (6), RMSE can be the root mean square error of the XGBoost model; y i This can be the measured throttle valve opening. can be the predicted opening degree of the throttle valve in the XGBoost model; n can be the total number of samples.
[0144] b) Throttling Valve Data Distribution Changes: By monitoring the Wasserstein distance of the throttle valve data distribution, the statistical differences between the new and training data are quantified. If a significant change in data distribution exceeding a set threshold is detected, the data distribution is considered to have changed significantly, triggering an update. The Wasserstein distance of the throttle valve data distribution can be calculated as follows:
[0145] D(P,Q)=inf γ ∈ Γ(P,Q) E (x,y)~γ [||xy||]. Equation (7)
[0146] In equation (7), D(P,Q) can be the distribution distance of the real-time parameters of the throttle valve; P and Q can be the probability distributions of the old and new data, respectively; inf can be the maximum lower bound; E (x,y)~γ[||xy||] can be the expected value of the movement cost (i.e. the distance from x to y) from P to Q under the joint distribution γ.
[0147] S53. Update Process: If the model's performance on the new dataset begins to decline or the data distribution changes, instead of retraining the new model, the existing model will be updated using the new data. This incremental learning strategy runs the model to gradually integrate new information and adjust its internal structure and parameters to adapt to data changes. The update process uses an online learning method, where the model parameters are updated according to the following adjustment rules:
[0148]
[0149] In equation (8), θ old and θ new These can be the parameters of the XGBoost model before and after the update; α can be the learning rate. This can be used for new data D new The gradient of the loss function.
[0150] S6. Use the latest model to predict the opening degree of the throttle valve in real time to ensure that the target pressure is achieved under various operating conditions. Specifically, this includes: using updated data to predict and evaluate the throttle valve data from January 2, 2024 to January 8, 2024, and calculating the RMSE based on the predicted and actual values to be 0.020542. A comparison table of some predicted and actual values is shown in Table 3 below:
[0151] Table 3 Comparison of Predicted and Actual Values
[0152] Actual valve opening 0.4845 0.5292 0.6795 0.7998 0.85 Predict valve opening 0.4822 0.5251 0.6691 0.7961 0.8499
[0153] Although the present invention has been described above in conjunction with exemplary embodiments and accompanying drawings, those skilled in the art should understand that various modifications can be made to the above embodiments without departing from the spirit and scope of the claims.
Claims
1. A throttle valve control method based on incremental learning, characterized in that, The throttle valve control method based on incremental learning includes the following steps: Collect real-time parameters of the throttle valve during drilling, including at least the outlet flow rate, temperature, density, throttle valve opening degree, and measured casing pressure; The pre-trained XGBoost model is applied to the drilling parameters to obtain the predicted opening of the throttle valve. When the performance evaluation of the XGBoost model deteriorates or the distribution distance of the real-time parameters of the throttle valve exceeds a preset threshold, the XGBoost model is updated according to the real-time parameters.
2. The throttle valve control method based on incremental learning according to claim 1, characterized in that, The pre-training includes: Collect valve openings corresponding to different target sleeve pressures and parameter data of one or more sets of throttle valves corresponding to the valve openings; The parameter data of the throttle valve is preprocessed, and the preprocessing includes: filtering the input data of the XGBoost model based on the influence of the parameter data of the throttle valve on the valve opening; The preprocessed parameter data is divided into a training dataset and a test dataset, and the XGBoost model is trained and evaluated based on the training dataset and the test dataset.
3. The throttle valve control method based on incremental learning according to claim 2, characterized in that, The preprocessing also includes: Construct a random forest model and apply the parameter data of the throttle valve to the random forest model; The overall importance score of the features of the random forest model is calculated and ranked using the random forest model. The input data for the XGBoost model is confirmed based on the sorting.
4. The throttle valve control method based on incremental learning according to claim 3, characterized in that, The calculation of the overall importance score includes: The feature contribution value is obtained by calculating the difference between the average squared errors of the parent and child nodes generated by each split of the features of the random forest model. The feature contribution values are accumulated, averaged, and normalized to obtain the overall importance score.
5. The throttle valve control method based on incremental learning according to claim 4, characterized in that, The formula for calculating the feature contribution value is: In equation (1), y i This represents the measured throttle valve opening. The predicted opening of the throttle valve in the XGBoost model; n is the total number of samples; MSE parent The mean squared error of the parent node; MSE leftchild and MSE rightchild ρ and pR are the mean variances of the left and right child nodes after the split, respectively; pL and pR are the sample proportions of the left and right subtrees, respectively.
6. The throttle valve control method based on incremental learning according to claim 1, characterized in that, The formula for calculating the performance degradation of the XGBoost model is as follows: In equation (2), RMSE is the root mean square error of the XGBoost model; y i This represents the measured throttle valve opening. is the predicted opening degree of the throttle valve in the XGBoost model; n is the total number of samples; The formula for calculating the distribution distance of the real-time parameters of the throttle valve is: D(P,Q )=inf γ ∈ Γ(P,Q) E (x,y)~γ [∥x - y∥] Equation (3) In equation (3), P and Q are the probability distributions of the old and new data, respectively; inf is the maximum lower bound; E (x,y)~γ [∥xy∥] represents the expected value of the movement cost (i.e., the distance from x to y) from P to Q under the joint distribution γ.
7. The throttle valve control method based on incremental learning according to claim 1, characterized in that, When updating the XGBoost model based on the real-time parameters, the calculation formula for the parameter update of the XGBoost model is as follows: In equation (4), θ old and θ new These are the parameters of the XGBoost model before and after the update, respectively; α is the learning rate; Regarding the new data D new The gradient of the loss function.
8. A throttle valve control device based on incremental learning, characterized in that, The incremental learning-based throttle valve control device includes a connected real-time parameter collection module and a throttle valve opening prediction module, wherein... The real-time parameter collection module is configured to collect real-time parameters of the throttle valve during drilling. The real-time parameters include at least the outlet flow rate, temperature, density, throttle valve opening degree, and measured casing pressure. The throttle valve opening prediction module is configured to apply a pre-trained XGBoost model to the drilling parameters to obtain the predicted opening of the throttle valve. When the performance evaluation of the XGBoost model deteriorates or the distribution distance of the real-time parameters of the throttle valve exceeds a preset threshold, the XGBoost model is updated according to the real-time parameters.
9. A computer device, characterized in that, The computer device includes: At least one processor; and A memory storing program instructions configured to be executed by the at least one processor, the program instructions including instructions for executing the incremental learning-based throttle valve control method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the throttle valve control method based on incremental learning as described in any one of claims 1 to 7.