Method and system for calculating working fluid level of sucker-rod pumping well

Through data analysis and xgboost algorithm, the online prediction model of dynamic fluid level was established, and the problems of low efficiency and poor accuracy of echo method and power diagram method in the calculation of dynamic fluid level of the rod pump oil pump are solved, real-time monitoring and high accuracy are achieved without stopping calculating the dynamic fluid level.

CN119025776APending Publication Date: 2024-11-26PETROCHINA CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310602489.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-25
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

Among the existing methods for calculating the dynamic fluid level of the rod pump oil well, the echo measurement method has high working intensity, high cost and low efficiency, while the power diagram method has inaccurate display and large error, resulting in low calculation efficiency of the dynamic fluid level. and poor accuracy.

Method used

Using data analysis methods, by collecting and pre-processing the data of the oil well production system, using the xgboost algorithm to establish an online prediction model of the dynamic fluid level, combined with the characteristic indicators of the concentrated factors of the dynamic fluid level influencing factors, real-time dynamic fluid level monitoring and calculation are achieved without stopping.

Benefits of technology

Real-time online monitoring of the dynamic fluid level is realized, which reduces the intensity and cost of manual testing, improves calculation efficiency and accuracy, reduces safety risks, and participates in the calculation through multiple parameters, reducing the impact of abnormal work graphs on the results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025776A_ABST
    Figure CN119025776A_ABST
Patent Text Reader

Abstract

The invention discloses a method and system for calculating the working fluid level of a sucker-rod pumping well, and belongs to the technical field of sucker-rod pumping well working fluid level calculation.The method comprises the steps that data of an existing pumping well production system is collected, and the data is preprocessed to obtain a working fluid level calculation data set; carrying out quantitative analysis on indexes in the working fluid level calculation data set, selecting a plurality of characteristic indexes with large correlation with the working fluid level, and establishing a working fluid level influence factor set; based on the working fluid level calculation data set, an xgboost algorithm is adopted to establish a working fluid level online prediction model; and the characteristic indexes in the working fluid level influence factor set serve as input, the pumping well working fluid level serves as an output variable, and the working fluid level online prediction model is adopted to calculate the target oil well working fluid level. According to the method, the frequency of testing the working fluid level of the sucker-rod pump in oilfield development can be reduced, the construction cost is reduced, meanwhile, effective utilization of existing data of an oilfield is improved, and a data basis is provided for implementation of intelligent intermittent development of the oilfield.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of dynamic liquid level calculation during production of a rod pumping unit, and in particular to a method and system for calculating the dynamic liquid level of a rod pumping well. Background Art

[0002] The rod pump oil well is a mechanical oil production method commonly used in oil fields at home and abroad. It is the main power consumption and material consumption unit of the oil field production process. How to achieve its optimized operation and improve the efficiency of the mechanical production system has always been the focus of research. The real-time online detection of the downhole dynamic liquid level position is of great significance to the optimization of the oil production process and the energy saving, consumption reduction and emission reduction of oil fields. The dynamic liquid level parameters of the oil well directly reflect the liquid supply of the formation and the downhole supply and discharge relationship. It is one of the key data for the adaptability evaluation and optimization of the oil production process. The change of the dynamic liquid level combined with the production data of the oil well can also reflect whether the oil well is normal, such as sand plugging and wax deposition. Therefore, the dynamic liquid level of the oil well is frequently monitored, and the production parameters of the oil well, the water injection of the water injection well in the same layer, and the conventional measures such as timely sand flushing, well washing, and wax removal of the oil well are appropriately adjusted, which will effectively and efficiently exert the production capacity of the oil well.

[0003] The most widely used methods for monitoring dynamic liquid level data at home and abroad are mainly echo measurement method and dynamometer diagram method.

[0004] The echo measurement method uses the associated gas or compressed gas in the annulus of the oil well casing to generate infrasound waves of a specific spectrum through a controllable sonic explosion. The sound waves propagate along the annulus of the oil well casing, and produce reflected echoes through the coupling and the liquid surface. The microphone inputs the echo signal into the wellhead instrument of the embedded advanced reduced instruction set device. The ARM performs frequency domain signal processing or calculates the dynamic liquid level value on the spot, or data is packetized, encrypted, and transmitted. The data is transmitted to the background monitoring server through the general packet radio service technology extranet or the wireless remote terminal unit intranet to realize real-time dynamic monitoring of the dynamic liquid level and casing pressure of the oil and gas well. In actual production, the echo sounder is generally manually operated in the shutdown state to detect the dynamic liquid level downhole. This test method has high work intensity, high cost, low efficiency, cannot be detected online in real time, and has certain safety hazards.

[0005] The dynamometer method is to analyze and count a large number of pump dynamometers, combined with actual production experience, for a normal dynamometer, a relatively accurate upper and lower static load can be determined, and then the upper and lower static loads can be used to push the liquid level back. With the popularization of the dynamometer of the pumping unit, this method can basically realize real-time dynamic liquid level calculation. However, in the actual test of dynamic liquid level data, the dynamometer is often normal or the sinking degree is sufficient, but the dynamometer shows insufficient liquid supply. In addition, the dynamometer deviation and dynamometer abnormality caused by the long-term lack of maintenance of the dynamometer also lead to large errors in the calculation of the dynamic liquid level. Summary of the invention

[0006] In order to solve the problems that the echo method used to measure the dynamic liquid level in the rod pump oil well has high labor intensity, high cost and low efficiency, and the dynamometer diagram method has inaccurate dynamometer display, and the dynamometer diagram is offset and abnormal due to long-term lack of maintenance of the dynamometer, which leads to large errors in dynamic liquid level calculation, the present invention provides a method and system for calculating the dynamic liquid level in the rod pump oil well, which can realize real-time dynamic liquid level monitoring without stopping the machine, improve calculation efficiency and accuracy, and reduce labor intensity.

[0007] A method for calculating the dynamic liquid level of a sucker rod pump oil well comprises the following steps:

[0008] S1: Collect data from existing oil well production systems and pre-process the data to obtain a dynamic liquid level calculation data set;

[0009] S2: Quantitatively analyze the indicators in the dynamic liquid level calculation data set, select several characteristic indicators with high correlation with the dynamic liquid level, and establish a set of dynamic liquid level influencing factors;

[0010] S3: Based on the dynamic liquid level calculation data set, the xgboost algorithm is used to establish an online dynamic liquid level prediction model;

[0011] S4: Taking the characteristic index of the dynamic liquid level influencing factors as input and the dynamic liquid level of the pumping well as the output variable, the dynamic liquid level online prediction model is used to calculate the dynamic liquid level of the target oil well.

[0012] The following steps are also included:

[0013] Root mean square error, determination coefficient, mean absolute error and mean square error were used as main indicators to evaluate the prediction effect, and the model with the best online prediction performance of the discharge liquid level was selected.

[0014] The criteria for determining the model with the best online prediction performance of dynamic liquid level are:

[0015] The judgment criteria are the model with the smallest root mean square error, the largest coefficient of determination, and the smallest mean absolute error and the smallest mean square error.

[0016] The data collected from the existing oil well production system include at least one of daily data, monthly data and real-time data; the dynamic data of the oil well is obtained from the daily data and monthly data; the power diagram and electrical parameter data of the oil well are obtained from the real-time data.

[0017] The data preprocessing to obtain the dynamic liquid level calculation data set includes the following steps:

[0018] Data key-value pair correspondence to determine prediction dimensions: Use the data dictionary to match all data labels of all pumping wells one by one, and delete useless and empty value dimensions;

[0019] Outlier identification and cleaning: Use pandas for statistics, and directly use describe() to observe the statistical description of the data. According to the statistical results, delete the data with a numeric column value of 0, a very small change in the numeric column value, or a constant numeric column value;

[0020] Missing data interpolation: Introduce the quadratic spline interpolation method to fill in and discard the data that has been cleaned by outlier identification;

[0021] Data normalization: Using the Z value normalization method, each dimension is adjusted to a mean of 0 and a variance of 1 to obtain the dynamic liquid surface data set.

[0022] The pre-processed dynamic liquid level data set includes at least six of the 24 items, including stroke, stroke number, maximum load, minimum load, average active power, maximum active power, maximum active power in the upper stroke, maximum active power in the lower stroke, current, voltage, maximum current, minimum current, maximum current in the upper stroke A, maximum current in the lower stroke A, tested dynamic liquid level, effective stroke, calculated pump efficiency, pump filling coefficient, pump power, bare rod power, calculated output, upper pump load line, lower pump load line and calculated dynamic liquid level.

[0023] The quantitative analysis of the indicators in the dynamic liquid level calculation data set is performed by at least using one of the correlation coefficient analysis methods of the Pearson correlation coefficient method and the Spearman correlation coefficient method.

[0024] The dynamic liquid level calculation dataset is used as training samples, and the training samples are divided into training set and test set in an 8:2 ratio. The xgboost algorithm is used to train and establish an online dynamic liquid level prediction model.

[0025] A rod pump oil well dynamic liquid level calculation system, comprising a data preprocessing module, a data set building module, a model building module and a result output module;

[0026] A data preprocessing module is used to collect data from existing oil well production systems and preprocess the data to obtain a dynamic liquid level calculation data set;

[0027] A dynamic liquid level influencing factor set building module is used to quantitatively analyze the indicators in the dynamic liquid level calculation data set, select several characteristic indicators with high correlation with the dynamic liquid level, and establish a dynamic liquid level influencing factor set;

[0028] The model building module is used to use the xgboost algorithm to explore the mapping relationship between the dynamic liquid level and the power diagram and electrical parameters, and to establish an online prediction model for the dynamic liquid level;

[0029] The result output module is used to calculate the dynamic liquid level of the target oil well by using the dynamic liquid level online prediction model, taking the characteristic index of the dynamic liquid level influencing factors as input and the dynamic liquid level of the pumping well as output variable.

[0030] Also includes a model selection module;

[0031] The model selection module is used to evaluate the prediction effect using root mean square error, determination coefficient, mean absolute error and mean square error as main indicators, and to select the model with the best online prediction performance of the liquid level.

[0032] Compared with the prior art, the present invention has the following beneficial effects:

[0033] Compared with the echo measurement method, the present invention completely adopts data analysis to predict the dynamic liquid level depth, reduces the manual input required for testing, and reduces the testing cost by about 3.6 million yuan / year (150 yuan / well time * 2000 times / month * 12 months = 3.6 million / year); according to the data update frequency of about 1 hour / time, it can achieve a dynamic liquid level prediction in 1 hour, compared with the manual test frequency of about 20 days / time / well (abnormal wells, measure wells, new wells are densely packed), the prediction frequency is increased, and real-time online monitoring is realized, providing a basis for rapid decision-making of oil wells; the dynamic liquid level is completely predicted by data analysis, which reduces the intensity of manual testing and reduces the safety hazards caused by uncertain manual operation. Compared with the indicator diagram method for predicting the dynamic liquid level, in addition to using the indicator diagram load data, the present invention also quotes a variety of parameters to participate in the dynamic liquid level calculation, including electrical parameters, pump efficiency, pump filling degree, production, etc., a total of 21 types, reducing the influence of abnormal dynamometer diagrams on the dynamic liquid level calculation and improving accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the following is a brief introduction to the drawings required for use in the embodiment:

[0035] Figure 1 It is a flow chart of a method for calculating the dynamic liquid level of a sucker rod pump oil well according to the present invention;

[0036] Figure 2 A schematic diagram of a system for calculating the dynamic liquid level of a sucker rod pump well according to the present invention;

[0037] Figure 3 This is a schematic diagram of the data key-value pair correspondence process according to an embodiment of the present invention;

[0038] Figure 4 Determine prediction dimensions for data key-value pairs according to the embodiment of the present invention;

[0039] Figure 5 This is a schematic diagram of data spline interpolation according to an embodiment of the present invention;

[0040] Figure 6 A comparison diagram of the actual dynamic liquid surface and the predicted dynamic liquid surface of the present invention;

[0041] Figure 7 The figure is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0042] The present invention will be further described below in conjunction with the accompanying drawings:

[0043] To achieve the above purpose, the present invention proposes a method and system for calculating the dynamic liquid level of a rod pump well. The production process knowledge is organically combined, and computer technology is applied to the dynamic liquid level that is difficult to measure or temporarily unmeasurable. Other easily measurable variables are selected, and inferred or estimated by forming a certain mathematical relationship, so that software replaces hardware.

[0044] By analyzing the characteristics of pumping well data, extracting integrated features and creating features with dimensionality reduction algorithms, the original data set is converted into characteristic parameters that better represent the potential problems of the prediction model, that is, to extract characteristic parameters such as the dynamic liquid level calculation model of the pumping well. The Pearson correlation coefficient method, Speraman correlation coefficient method and other algorithms are used to quantitatively evaluate the influencing factors of the pumping well and determine the main controlling factors of the soft measurement of the dynamic liquid level. Through the advanced and practical xgboost machine learning algorithm, a prediction model is established to provide support for the soft measurement application of the dynamic liquid level of the pumping well. The main contents include:

[0045] (1) Dynamic and static parameter analysis and preprocessing research of pumping wells

[0046] In view of the current characteristics of oil well collection data such as asynchronous, unbalanced samples, instability and incompleteness, data preprocessing is carried out to improve data quality; a step-by-step process for data processing is established to form a systematic management of the machine mining system data.

[0047] Collect and extract data from the existing pumping well production system of the oil field, including daily data, monthly data and real-time data, and obtain the dynamic data of the pumping wells from the daily data and monthly data; obtain the power diagram, electrical parameters and other data from the real-time data of the pumping wells.

[0048] (2) Constructing an application mechanism combining big data intelligence technology with machine-generated acquisition systems

[0049] The influencing factors are analyzed by analyzing the dynamic and static data, reservoir data, injection and production data, and real-time acquisition of power diagram and electrical parameter data during the production process of the pumping well; by extracting the relevant integrated parameters of the dynamic liquid level, the effective influencing factors and indicator sample sets are determined.

[0050] The Pearson correlation coefficient method and the Speraman correlation coefficient method are used to quantitatively evaluate the indicators in the dynamic liquid level calculation data set of the pumping well. The correlation coefficient analysis is performed by at least one of the Pearson correlation and Spearman correlation analysis methods. The correlation ranking can be used to determine the strength of the correlation between each indicator and the dynamic liquid level, select the characteristic indicators most relevant to the dynamic liquid level, and determine the main controlling factors affecting the soft-measured dynamic liquid level.

[0051] (3) Establish a data-driven online prediction model for dynamic liquid level

[0052] Big data technology is used to explore the mapping relationship between dynamic liquid level and power diagram and electrical parameter changes, and online identification and disclosure of the laws of formation seepage, equipment operating conditions and oil well dynamic liquid level. The advanced and practical machine learning intelligent algorithm xgboost algorithm is used to establish an online prediction model for dynamic liquid level, providing support for the soft measurement application of dynamic liquid level in pumping wells.

[0053] (4) Development and application of soft sensor model devices

[0054] Soft sensing is the organic combination of production process knowledge, the application of computer technology to important variables that are difficult to measure or temporarily unmeasurable, the selection of other easily measurable variables, and the inference or estimation through the formation of certain mathematical relationships to replace the functions of hardware.

[0055] Develop a dynamic liquid level soft measurement model system based on xgboost. Use the trained model to predict the dynamic liquid level under different production conditions, and establish the dynamic liquid level prediction function of the pumping well.

[0056] like Figure 1 As shown, the present invention provides a method for calculating the dynamic liquid level of a sucker rod pump well, comprising the following steps:

[0057] Collect data from existing oil well production systems and pre-process the data to obtain a dynamic liquid level calculation data set;

[0058] Quantitatively analyze the indicators in the dynamic liquid level calculation data set, select several characteristic indicators with high correlation with the dynamic liquid level, and establish a set of dynamic liquid level influencing factors;

[0059] Based on the dynamic liquid level calculation data set, the xgboost algorithm is used to establish an online dynamic liquid level prediction model;

[0060] Taking the characteristic index of dynamic liquid level influencing factors as input and the dynamic liquid level of the pumping well as output variable, the dynamic liquid level online prediction model is used to calculate the dynamic liquid level of the target oil well.

[0061] The following steps are also included:

[0062] Root mean square error, determination coefficient, mean absolute error and mean square error were used as main indicators to evaluate the prediction effect, and the model with the best online prediction performance of the discharge liquid level was selected.

[0063] The present invention is described in detail below with reference to the accompanying drawings:

[0064] The criteria for determining the model with the best online prediction performance of dynamic liquid level are:

[0065] The judgment criteria are the model with the smallest root mean square error, the largest coefficient of determination, and the smallest mean absolute error and the smallest mean square error.

[0066] The data collected from the existing oil well production system include at least one of daily data, monthly data and real-time data; the dynamic data of the oil well is obtained from the daily data and monthly data; the power diagram and electrical parameter data of the oil well are obtained from the real-time data.

[0067] The data preprocessing to obtain the dynamic liquid level calculation data set includes the following steps:

[0068] Data key-value pair correspondence to determine prediction dimensions: Use the data dictionary to match all data labels of all pumping wells one by one, and delete useless and empty value dimensions;

[0069] Outlier identification and cleaning: Use pandas for statistics, and directly use describe() to observe the statistical description of the data. According to the statistical results, delete the data with a numeric column value of 0, a very small change in the numeric column value, or a constant numeric column value;

[0070] Missing data interpolation: Introduce the quadratic spline interpolation method to fill in and discard the data that has been cleaned by outlier identification;

[0071] Data normalization: Using the Z value normalization method, each dimension is adjusted to a mean of 0 and a variance of 1 to obtain the dynamic liquid surface data set.

[0072] The pre-processed dynamic liquid level data set includes at least six of the 24 items, including stroke, stroke number, maximum load, minimum load, average active power, maximum active power, maximum active power in the upper stroke, maximum active power in the lower stroke, current, voltage, maximum current, minimum current, maximum current in the upper stroke A, maximum current in the lower stroke A, tested dynamic liquid level, effective stroke, calculated pump efficiency, pump filling coefficient, pump power, bare rod power, calculated output, upper pump load line, lower pump load line and calculated dynamic liquid level.

[0073] The quantitative analysis of the indicators in the dynamic liquid level calculation data set is performed by at least using one of the correlation coefficient analysis methods of the Pearson correlation coefficient method and the Spearman correlation coefficient method.

[0074] The dynamic liquid level calculation dataset is used as training samples, and the training samples are divided into training set and test set in an 8:2 ratio. The xgboost algorithm is used to train and establish an online dynamic liquid level prediction model.

[0075] Example

[0076] like Figure 1 As shown, a method for calculating the dynamic liquid level of a sucker rod pump well comprises the following steps:

[0077] S1: Collect and extract the existing oil well production system data of the oil field, and obtain the dynamic liquid level calculation data set after data preprocessing and feature processing.

[0078] Collect existing oil well production system data including at least one of daily data, monthly data and real-time data;

[0079] The pre-processed dynamic liquid level data set includes at least six of the 24 items, including stroke, stroke number, maximum load, minimum load, average active power, maximum active power, maximum active power in the upper stroke, maximum active power in the lower stroke, current, voltage, maximum current, minimum current, maximum current in the upper stroke A, maximum current in the lower stroke A, tested dynamic liquid level, effective stroke, calculated pump efficiency, pump filling coefficient, pump power, bare rod power, calculated output, upper pump load line, lower pump load line and calculated dynamic liquid level.

[0080] The data preprocessing includes the following steps:

[0081] (1) Data key-value pair correspondence to determine the prediction dimension

[0082] like Figure 3 As shown in the figure, the data key-value pair correspondence process; since the data is retrieved from multiple systems, and there are a large number of repeated and non-corresponding key-value pairs in each data table, the collected raw data labels are confusing and difficult to process, so it is necessary to use the data dictionary to correspond all the data labels of all wells one by one. Figure 4 As shown in the figure, through the correspondence between key-value pairs, some useless and empty value dimensions are deleted to determine the prediction dimension.

[0083] (2) Outlier Identification and Cleaning

[0084] Statistical-based methods are used to monitor general outliers and the results are saved.

[0085] Use pandas for simple statistics and directly use describe() to observe the statistical description of the data. The statistical data is continuous, as follows:

[0086] count: the number of elements in a column;

[0087] mean: the average value of a column of data;

[0088] std: mean square error of a column of data; (the arithmetic square root of the variance reflects the degree of dispersion of a data set: the larger the value, the greater the difference between the data, and the higher the degree of dispersion of the data in the data set; the smaller the value, the smaller the difference between the data, and the lower the degree of dispersion of the data in the data set)

[0089] min: the minimum value in a column of data;

[0090] max: the maximum value in a column;

[0091] 25%: The average value of the first 25% of the data in a column;

[0092] 50%: The average value of the first 50% of the data in a column;

[0093] 75%: The average value of the first 75% of the data in a column;

[0094] According to the statistical results, the data with numeric column values ​​of 0, extremely small changes, and unchanged values ​​will be deleted.

[0095] (3) Missing data interpolation

[0096] like Figure 5 As shown in the figure, based on the complexity of missing data, a method of filling missing values ​​with constraints is proposed: the quadratic spline interpolation method is introduced to fill and discard the data after outlier identification and cleaning. The spline interpolation spline is calculated by solving the polynomial of the adjacent data of the missing position, and different polynomials are used to fill the data according to different attribute column data, which retains the characteristics of the collected data itself to the greatest extent, making the inserted data more consistent with the actual distribution of the original data.

[0097] (4) Data normalization

[0098] Sample features have different sources and measurement units, which will affect the efficiency of xgboost operations. This paper adopts the Z-value normalization method to adjust each dimension to a mean of 0 and a variance of 1.

[0099] Assume there are N samples {x(n)}Nn=1, for each dimension x, we first calculate its mean and variance:

[0100]

[0101]

[0102] Then, the feature x () Subtract the mean and divide by the standard deviation to get the new eigenvalue

[0103]

[0104] Among them, the standard deviation σ cannot be 0. If the standard deviation is 0, it means that this dimension of feature has no distinguishing property and can be deleted directly.

[0105] According to one embodiment of the present invention, the establishment of a dynamic liquid level calculation data set includes data preparation and data preprocessing. In the data preparation process, the oil well dynamic data is obtained from the daily data and the monthly report data; the power diagram and electrical parameters and other data are obtained from the real-time data of the oil well. The data preprocessing process includes outlier identification and cleaning, missing data processing, data normalization, etc. The statistical results of the dynamic liquid level data set obtained after preprocessing the data of the existing pumping well production system are shown in Table 1.

[0106] Table 1 is the statistical results of the dynamic liquid surface data set obtained after data preprocessing

[0107]

[0108]

[0109] S2: The Pearson correlation coefficient method and the Spearman correlation coefficient method are used to quantify the correlation coefficients of the indicators in the dynamic liquid level calculation data set, and several characteristic indicators most relevant to the dynamic liquid level are selected to establish a set of dynamic liquid level influencing factors;

[0110] (1) Pearson correlation coefficient method

[0111] 1) Calculate the correlation coefficient r between variables

[0112]

[0113] γ can also be expressed by (X i ,Y i ) The standard score mean of the sample points is estimated to be an expression equivalent to the above formula:

[0114]

[0115] In the formula and X i and Y i The standard score of the sample. and X i and Y i The mean of the sample; σ x and σ y X i and Y i The standard deviation of the sample; n is the number of samples; i is the serial number of the sample point.

[0116] (2) Spearman correlation coefficient method

[0117] For a sample with a sample size of n, n original data X i ,Y iis converted into level data x i ,y i , the correlation coefficient ρ is

[0118]

[0119] The level data X i ,Y i is the average of the descending positions of each original data, as shown in Table 2:

[0120] Table 2 Average values ​​of data in descending order

[0121]

[0122]

[0123] In practice, the link between the variables is irrelevant and can be calculated by a simple procedure: the difference d between the ranks of the two observed variables i =x i -y i , then ρ is

[0124]

[0125] (3) Optimization of influencing factors

[0126] The correlation between the indicators in the dynamic liquid level calculation data set and the dynamic liquid level is quantitatively analyzed, and the correlation coefficients are presented from high to low. According to the correlation comparison, several characteristic indicators with high correlation with the dynamic liquid level are selected through human-computer interaction to establish a set of dynamic liquid level influencing factors.

[0127] 22 dynamic liquid level influencing factors were applied, the correlation was calculated by Pearson and Spearman methods, and the correlation was sorted, and the influencing factors with high correlation were selected and applied to the model.

[0128] According to a method for calculating the dynamic liquid level of a rod pump well according to an embodiment of the present invention, the correlation coefficient analysis is performed by at least one of Pearson correlation and Spearman correlation analysis, and the correlation strength of each indicator and the dynamic liquid level can be determined by correlation sorting. The results of Pearson correlation and Spearman correlation analysis are shown in Table 3.

[0129] Table 3 Pearson correlation and Spearman correlation analysis results

[0130]

[0131]

[0132] S3: Use the xgboost algorithm to explore the mapping relationship between the dynamic liquid level and various parameters such as the power diagram and electrical parameters, and establish an online prediction model for the dynamic liquid level;

[0133] The dynamic liquid level calculation data set is used as a training sample, and the training samples are divided into a training set and a test set in an 8:2 ratio. The xgboost algorithm is used to train and establish an online prediction model for the dynamic liquid level. The advanced and practical machine learning intelligent algorithm xgboost algorithm is used to explore the mapping relationship between the dynamic liquid level and the power diagram and the change of electrical parameters, and to identify and reveal the laws of formation seepage, equipment conditions and the dynamic liquid level of the oil well online. An online prediction model for the dynamic liquid level is established to provide support for the soft measurement application of the dynamic liquid level in the pumping well.

[0134] S4: The prediction effect is evaluated by using four main indicators, namely, root mean square error (RMSE), determination coefficient (R2), mean absolute error (MAE) and mean square error (MSE). The model with the best performance in liquid level prediction is selected. The judgment criteria are the smaller the root mean square error (RMSE), the larger the determination coefficient (R2), the smaller the mean absolute error (MAE) and the smaller the mean square error (MSE);

[0135] (1) Mean square error calculation formula (MSE)

[0136]

[0137] Where m is the number of observations; f i —Observed value; y i —True value.

[0138] (2) Root mean square error calculation formula (RMSE)

[0139]

[0140] (3) Mean absolute error calculation formula (MAE)

[0141] The mean absolute error is the average of the absolute values ​​of the deviations between the individual prediction values ​​and the arithmetic mean. MAE can avoid the problem of data errors offsetting each other and can accurately reflect the size of the error. Its calculation formula is as follows:

[0142]

[0143] (4) Determination coefficient calculation formula (R2)

[0144]

[0145] S5: Taking the characteristic index of the dynamic liquid level influencing factors as input, the dynamic liquid level of the pumping well as the output variable, and the xgboost algorithm model with the best dynamic liquid level prediction performance, the dynamic liquid level of the target oil well is calculated. Figure 6 As shown, this is a comparison diagram of the actual dynamic liquid surface and the predicted dynamic liquid surface in this embodiment.

[0146] Table 4 is an example table of dynamic liquid level calculation results and error analysis using the xgboost algorithm with a strong correlation index as input and soft-measured dynamic liquid level as output.

[0147] Table 4 Example of dynamic liquid level calculation results and error analysis using the xgboost algorithm

[0148]

[0149]

[0150] like Figure 2 As shown, another object of the present invention is to provide a system for calculating the dynamic liquid level of a sucker rod pump oil well, comprising a data preprocessing module, a data set building module, a model building module, a model selection module and a result output module;

[0151] A data preprocessing module is used to collect data from existing oil well production systems and preprocess the data to obtain a dynamic liquid level calculation data set;

[0152] A dynamic liquid level influencing factor set building module is used to quantitatively analyze the indicators in the dynamic liquid level calculation data set, select several characteristic indicators with high correlation with the dynamic liquid level, and establish a dynamic liquid level influencing factor set;

[0153] The model building module is used to use the xgboost algorithm to explore the mapping relationship between the dynamic liquid level and the power diagram and electrical parameters, and to establish an online prediction model for the dynamic liquid level;

[0154] The result output module is used to calculate the dynamic liquid level of the target oil well by using the dynamic liquid level online prediction model, taking the characteristic index of the dynamic liquid level influencing factors as input and the dynamic liquid level of the pumping well as output variable;

[0155] The model selection module is used to evaluate the prediction effect using root mean square error, determination coefficient, mean absolute error and mean square error as main indicators, and to select the model with the best online prediction performance of the liquid level.

[0156] like Figure 7 As shown, the third object of the present invention is to provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for calculating the dynamic liquid level of a rod pump oil well when executing the computer program.

[0157] The method for calculating the dynamic liquid level of a sucker rod pump oil well comprises the following steps:

[0158] S1: Collect data from existing oil well production systems and pre-process the data to obtain a dynamic liquid level calculation data set;

[0159] S2: Quantitatively analyze the indicators in the dynamic liquid level calculation data set, select several characteristic indicators with high correlation with the dynamic liquid level, and establish a set of dynamic liquid level influencing factors;

[0160] S3: Based on the dynamic liquid level calculation data set, the xgboost algorithm is used to establish an online dynamic liquid level prediction model;

[0161] S4: Taking the characteristic index of the dynamic liquid level influencing factors as input and the dynamic liquid level of the pumping well as the output variable, the dynamic liquid level online prediction model is used to calculate the dynamic liquid level of the target oil well.

[0162] A fourth object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method for calculating the dynamic liquid level of a rod pump well.

[0163] The method for calculating the dynamic liquid level of a sucker rod pump oil well comprises the following steps:

[0164] S1: Collect data from existing oil well production systems and pre-process the data to obtain a dynamic liquid level calculation data set;

[0165] S2: Quantitatively analyze the indicators in the dynamic liquid level calculation data set, select several characteristic indicators with high correlation with the dynamic liquid level, and establish a set of dynamic liquid level influencing factors;

[0166] S3: Based on the dynamic liquid level calculation data set, the xgboost algorithm is used to establish an online dynamic liquid level prediction model;

[0167] S4: Taking the characteristic index of the dynamic liquid level influencing factors as input and the dynamic liquid level of the pumping well as the output variable, the dynamic liquid level online prediction model is used to calculate the dynamic liquid level of the target oil well.

[0168] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0169] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0170] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0171] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0172] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for calculating the dynamic liquid level of a sucker rod pump well, characterized in that: The following steps are involved: S1: Collect data from existing oil well production systems and pre-process the data to obtain a dynamic liquid level calculation data set; S2: Quantitatively analyze the indicators in the dynamic liquid level calculation data set, select several characteristic indicators with high correlation with the dynamic liquid level, and establish a set of dynamic liquid level influencing factors; S3: Based on the dynamic liquid level calculation data set, the xgboost algorithm is used to establish an online dynamic liquid level prediction model; S4: Taking the characteristic index of the dynamic liquid level influencing factors as input and the dynamic liquid level of the pumping well as the output variable, the dynamic liquid level online prediction model is used to calculate the dynamic liquid level of the target oil well.

2. A method for calculating the dynamic liquid level of a sucker rod pump well according to claim 1, characterized in that: The following steps are also included: Root mean square error, determination coefficient, mean absolute error and mean square error were used as main indicators to evaluate the prediction effect, and the model with the best online prediction performance of the discharge liquid level was selected.

3. A method for calculating the dynamic liquid level of a sucker rod pump well according to claim 2, characterized in that: The criteria for determining the model with the best online prediction performance of dynamic liquid level are: The judgment criteria are the model with the smallest root mean square error, the largest coefficient of determination, and the smallest mean absolute error and the smallest mean square error.

4. The method for calculating the dynamic liquid level of a sucker rod pump well according to claim 1, characterized in that: The data collected from the existing oil well production system include at least one of daily data, monthly data and real-time data; the dynamic data of the oil well is obtained from the daily data and monthly data; the power diagram and electrical parameter data of the oil well are obtained from the real-time data.

5. The method for calculating the dynamic liquid level of a sucker rod pump well according to claim 1, characterized in that: The data preprocessing to obtain the dynamic liquid level calculation data set includes the following steps: Data key-value pair correspondence to determine prediction dimensions: Use the data dictionary to match all data labels of all pumping wells one by one, and delete useless and empty value dimensions; Outlier identification and cleaning: Use pandas for statistics, and directly use describe() to observe the statistical description of the data. According to the statistical results, delete the data with a numeric column value of 0, a very small change in the numeric column value, or a constant numeric column value; Missing data interpolation: Introduce the quadratic spline interpolation method to fill in and discard the data that has been cleaned by outlier identification; Data normalization: Using the Z value normalization method, each dimension is adjusted to a mean of 0 and a variance of 1 to obtain the dynamic liquid surface data set.

6. The method for calculating the dynamic liquid level of a sucker rod pump well according to claim 1, characterized in that: The pre-processed dynamic liquid level data set includes at least six of the 24 items, including stroke, stroke number, maximum load, minimum load, average active power, maximum active power, maximum active power in the upper stroke, maximum active power in the lower stroke, current, voltage, maximum current, minimum current, maximum current in the upper stroke A, maximum current in the lower stroke A, tested dynamic liquid level, effective stroke, calculated pump efficiency, pump filling coefficient, pump power, bare rod power, calculated output, upper pump load line, lower pump load line and calculated dynamic liquid level.

7. A method for calculating the dynamic liquid level of a sucker rod pump well according to claim 1, characterized in that: The quantitative analysis of the indicators in the dynamic liquid level calculation data set is performed by at least using one of the correlation coefficient analysis methods of the Pearson correlation coefficient method and the Spearman correlation coefficient method.

8. The method for calculating the dynamic liquid level of a sucker rod pump well according to claim 1, characterized in that: The dynamic liquid level calculation dataset is used as training samples, and the training samples are divided into training set and test set in an 8:2 ratio. The xgboost algorithm is used to train and establish an online dynamic liquid level prediction model.

9. A system for calculating the dynamic liquid level of a rod pump oil well, characterized in that: It includes data preprocessing module, data set building module, model building module and result output module; A data preprocessing module is used to collect data from existing oil well production systems and preprocess the data to obtain a dynamic liquid level calculation data set; A dynamic liquid level influencing factor set building module is used to quantitatively analyze the indicators in the dynamic liquid level calculation data set, select several characteristic indicators with high correlation with the dynamic liquid level, and establish a dynamic liquid level influencing factor set; The model building module is used to use the xgboost algorithm to explore the mapping relationship between the dynamic liquid level and the power diagram and electrical parameters, and to establish an online prediction model for the dynamic liquid level; The result output module is used to calculate the dynamic liquid level of the target oil well by using the dynamic liquid level online prediction model, taking the characteristic index of the dynamic liquid level influencing factors as input and the dynamic liquid level of the pumping well as output variable.

10. The system for calculating the dynamic liquid level of a sucker rod pump oil well according to claim 9, characterized in that: Also includes a model selection module; The model selection module is used to evaluate the prediction effect using root mean square error, determination coefficient, mean absolute error and mean square error as main indicators, and to select the model with the best online prediction performance of the liquid level.

Citation Information

Cited By

  • Pumping unit working fluid level control method based on multiple regression optimization

    CN119373466A