Pumping unit working fluid level control method based on multiple regression optimization
Based on the control method of the oil -pumping engine liquid surface based on multiple regression optimizations, the problem of poor measurement accuracy and stability of the moving liquid surface in existing technologies, realizing high -precision and simplified operation of the dynamic liquid surface management, which meets the efficient oil well efficiency Demand in production.
Patent Information
- Application Number
- CN202411957848.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-01-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art has problems of poor accuracy and insufficient stability when measuring the hydraulic level of the pump well, which cannot meet the needs of efficient oil well production.
Adopt the control method based on the multi -regression optimized oil pumping machine, through the collection and analysis of the on -site data of the oil pump, obtain the underground pumping exercises, calculate the effective lifting of the liquid pillar load and the initial value of the dynamic liquid surface, and build the moving liquid surface The coefficient regression fitting model is obtained to obtain the calibration coefficient, correct the calculation value of the moving liquid surface, and adjust the multiple regression calculation formula according to the preset adjustment order until the target value of the moving liquid surface is obtained.
The measurement accuracy was significantly improved, the measurement process was simplified, the workload of the on -site artificial test work was reduced, the service life of the equipment was improved, the production cost was reduced, and the efficient and refined dynamic liquid surface management was achieved.
Smart Images

Figure CN119373466A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of digital metering of oil pumping wells, and in particular to a method for controlling a pumping machine liquid level based on multivariate regression optimization. Background Art
[0002] In the oil well production process, the dynamic liquid level is a key parameter, which directly reflects the quality of the formation's fluid supply capacity and the importance of efficient production. Traditional methods for measuring the dynamic liquid level include the echo method, the pressure gauge test method, and the float method. These methods are relatively simple in operation and principle, but there are certain shortcomings in practical applications. For example, the echo method is easily affected by the clarity of the waveform of the sucker rod coupling and the liquid surface reflection wave, as well as the limitations of the tester's subjective judgment ability; the pressure gauge method is subject to the objective limitations of the wellhead device during the installation of the test instrument; the float method is easily affected by the pressure in the casing.
[0003] Chinese Patent Publication No.: CN118223870A discloses a method for measuring the dynamic liquid level of a pumping unit. First, the dynamic liquid temperature deviation coefficient corresponding to the target pumping unit and the actual output power of the target pumping unit are matched and analyzed to select the standard detection sound wave that is most suitable for the dynamic liquid level detection. Then, a comprehensive analysis is performed based on the standard detection sound wave and the echo to achieve the measurement of the dynamic liquid level depth. However, there are still problems such as cumbersome measurement process, poor accuracy and insufficient stability.
[0004] It can be seen that the measurement results of the existing technology are not accurate enough to provide accurate and reliable dynamic liquid level data for oil well production, and cannot meet the actual needs of efficient production. Summary of the invention
[0005] To this end, the present invention provides a pumping motor liquid level control method based on multivariate regression optimization to overcome the technical problems in the prior art that still have deficiencies in measurement accuracy and stability, resulting in inaccurate measurement results and unable to meet the actual needs of efficient production of oil wells.
[0006] To achieve the above object, the present invention provides a method for controlling the hydraulic level of an oil pump based on multivariate regression optimization, comprising: Collect and analyze data on the pumping unit site, obtain several downhole pump performance diagrams, and number several downhole pump performance diagrams; Analyze any of the downhole pump diagrams, obtain the effective lifting fluid column load based on the analysis results, and obtain the initial calculation value of the dynamic liquid level based on the effective lifting fluid column load, well fluid density and plunger area parameters; Collecting a number of initial data corresponding to a number of influencing factors, normalizing the number of initial data, building a dynamic liquid surface coefficient regression fitting model based on the normalized data, and obtaining a dynamic liquid surface calibration coefficient based on the dynamic liquid surface coefficient regression fitting model; Correcting the initial calculated value of the dynamic liquid level according to the dynamic liquid level calibration coefficient to obtain a calculated value of the dynamic liquid level; Determining whether the dynamic liquid level calculation value is normal; When the dynamic liquid level calculation value is abnormal, the influencing parameters in the initial multiple regression calculation formula are adjusted one by one in sequence according to the preset adjustment order to obtain the adjusted multiple regression calculation formula, and the dynamic liquid level adjustment coefficient is obtained based on the adjusted multiple regression calculation formula. Then, the dynamic liquid level target value is obtained according to the dynamic liquid level adjustment coefficient and the dynamic liquid level calculation value, and it is judged whether the dynamic liquid level target value is normal. According to the judgment result, it is determined whether to continue to adjust the main influencing factors in the adjusted multiple regression calculation formula based on the preset adjustment order, and the adjustment is stopped when the dynamic liquid level target value is normal.
[0007] Compared with the prior art, the beneficial effects of the present invention are that the measurement process of the oil pumping machine liquid level control method optimized by multivariate regression is simple and easy to operate, the measurement accuracy is significantly improved, and the workload of on-site manual low-pressure testing is greatly reduced or even eliminated; the service life of the equipment is increased and the production cost is reduced.
[0008] Further, a number of downhole pump performance diagrams are obtained, including: Collect the ground indicator diagram of the oil pumping unit; The surface dynamometer diagram is analyzed and the one-dimensional wave equation of the sucker rod string is solved by the finite difference method to obtain the load and displacement at the downhole pump position; The downhole pump diagram is obtained based on load, displacement, sucker rod string, sucker pump length, sucker pump diameter, well fluid density and sucker rod density.
[0009] Further, obtaining the effective lifting liquid column load includes: Identify the pump valve opening and closing points of any of the downhole pump performance diagrams, and obtain the load endpoint A, load endpoint B, load endpoint C, and load endpoint D of any of the downhole pump performance diagrams, wherein load endpoint A is the left endpoint of the load line under the downhole pump performance diagram, load endpoint D is the right endpoint of the load line under the downhole pump performance diagram, load endpoint B is the left endpoint of the load line on the downhole pump performance diagram, and load endpoint C is the right endpoint of the load line on the downhole pump performance diagram; Get the average load value of the AD segment; Get the average load value of the BC segment; The effective lifting liquid column load of the corresponding downhole pump diagram is determined according to the load average value of the AD section and the load average value of the BC section.
[0010] Further, obtaining the initial value of the dynamic liquid level includes: Identify the opening and closing points of pump valves on the downhole pump performance diagram to obtain the effective lifting liquid column load; The obtained effective lifting liquid column load is solved together with the well fluid density and the plunger area parameter to obtain the initial calculation value of the dynamic liquid level.
[0011] Further, obtaining the dynamic liquid level calibration coefficient includes: Collect some initial data corresponding to some influencing factors; Normalizing a number of initial data of any influencing factor to obtain a number of processed data, and determining the any influencing factor based on the number of processed data; The dynamic liquid surface coefficient regression fitting model is established by using a multiple regression method and several influencing factors; The dynamic liquid level calibration coefficient is determined based on the dynamic liquid level coefficient regression fitting model.
[0012] Further, the dynamic liquid level calculation value is obtained, including: The dynamic liquid level calibration coefficient is determined jointly with the obtained dynamic liquid level initial value, wherein different work diagrams correspond to different calibration coefficients.
[0013] Further, judging whether the dynamic liquid level calculation value is normal includes: The dynamic liquid level calculation value is compared with the normal range of the dynamic liquid level. When the dynamic liquid level calculation value is within the normal range of the dynamic liquid level, the dynamic liquid level calculation value is normal; When the dynamic liquid level calculation value is not within the normal range of the dynamic liquid level, the dynamic liquid level calculation value is abnormal; Among them, the normal range of dynamic liquid level is determined through statistical analysis of historical production data.
[0014] Furthermore, when the dynamic liquid level calculation value is abnormal, the influencing parameters in the initial multiple regression calculation formula are adjusted one by one in sequence according to the preset adjustment sequence, including: Collect the initial value and adjustment range of casing pressure of oil wellhead casing; A first adjustment parameter is calculated based on a comparison result between the dynamic liquid level calculation value and the dynamic liquid level normal range, and the casing pressure initial value is adjusted according to the first adjustment parameter to obtain a casing pressure adjustment value.
[0015] Further, obtaining the casing pressure adjustment value includes: Determining whether the dynamic liquid level calculation value is on the left side or the right side of the normal range of the dynamic liquid level; Determine the first adjustment parameter according to the ratio of the excess value of the dynamic liquid level calculation value to itself; The casing pressure calculation value is determined according to the positional relationship between the dynamic liquid level calculation value and the normal range of the dynamic liquid level in conjunction with the first adjustment parameter, and the casing pressure calculation value is compared with the casing pressure adjustment range to determine the casing pressure adjustment value.
[0016] Further, judging whether the dynamic liquid level target value is normal includes: Obtaining an adjustment multivariate regression calculation formula based on the casing pressure adjustment value; The dynamic liquid level adjustment coefficient is obtained based on the adjustment multiple regression calculation formula; Correcting the dynamic liquid level calculation value according to the dynamic liquid level adjustment coefficient to obtain a dynamic liquid level target value; The target value of the dynamic liquid level is compared with the normal range of the dynamic liquid level. When the target value of the dynamic liquid level is within the normal range of the dynamic liquid level, the target value of the dynamic liquid level is normal. When the dynamic liquid level target value is not within the normal range of the dynamic liquid level, the dynamic liquid level target value is abnormal.
[0017] Furthermore, when the dynamic liquid level target value is abnormal, the influencing parameters in the initial multiple regression calculation formula are adjusted one by one in sequence according to the preset adjustment sequence, including: Collect the initial value and adjustment range of the stroke frequency of the sucker rod of the pumping unit; A second adjustment parameter is calculated based on a comparison result between the casing pressure adjustment value and the normal casing pressure range, and the stroke frequency initial value is adjusted according to the second adjustment parameter to obtain a stroke frequency adjustment value.
[0018] Further, obtaining the stroke adjustment value includes: Determine whether the dynamic liquid level target value is on the left or right side of the normal range of the dynamic liquid level; Determine the second adjustment parameter according to the ratio of the excess value of the casing pressure calculation value to itself; The calculated value of strokes is obtained by combining the second adjustment parameter according to the positional relationship between the calculated value of casing pressure and the normal range of casing pressure, and the calculated value of strokes is compared with the adjustment range of strokes to determine the adjustment value of strokes.
[0019] Further, judging whether the dynamic liquid level target value is normal includes: Obtaining an adjustment multiple regression calculation formula based on the stroke adjustment value; The dynamic liquid level adjustment coefficient is obtained based on the adjustment multiple regression calculation formula; The dynamic liquid level calculation value is corrected according to the dynamic liquid level adjustment coefficient to obtain the dynamic liquid level target value; The dynamic liquid level target value is compared with the dynamic liquid level normal range. When the dynamic liquid level target value is within the dynamic liquid level normal range, the dynamic liquid level target value is normal. When the dynamic liquid level target value is not within the normal range of the dynamic liquid level, the dynamic liquid level target value is abnormal.
[0020] Furthermore, when the dynamic liquid level target value is abnormal, the influencing parameters in the initial multiple regression calculation formula are adjusted one by one in sequence according to the preset adjustment sequence, including: Collect the initial stroke value and stroke adjustment range of the sucker rod of the pumping unit; The stroke calculation value is determined according to the positional relationship between the stroke calculation value and the normal stroke range in conjunction with the third adjustment parameter, and the stroke calculation value is compared with the stroke adjustment range to determine the stroke adjustment value.
[0021] Further, obtaining the stroke adjustment value includes: Determine whether the dynamic liquid level target value is on the left or right side of the normal range of the dynamic liquid level; Determine the third adjustment parameter according to the ratio of the excess value of the stroke frequency calculation value to itself; The stroke adjustment value is determined according to the positional relationship between the stroke calculation value and the normal range of stroke frequency in conjunction with the third adjustment parameter.
[0022] Further, judging whether the dynamic liquid level target value is normal includes: Obtaining an adjusted multiple regression calculation formula based on the stroke adjustment value; The dynamic liquid level adjustment coefficient is obtained based on the adjustment multiple regression calculation formula; The dynamic liquid level calculation value is corrected according to the dynamic liquid level adjustment coefficient to obtain the dynamic liquid level target value; The dynamic liquid level target value is compared with a preset dynamic liquid level normal range. When the dynamic liquid level target value is within the dynamic liquid level normal range, the dynamic liquid level target value is normal. When the dynamic liquid level target value is not within the normal range of the dynamic liquid level, the dynamic liquid level target value is abnormal, and the main influencing factors in the multiple regression calculation formula are continuously adjusted based on the preset adjustment sequence, and the adjustment is stopped when the dynamic liquid level target value is normal.
[0023] The multivariate regression optimization oil pumping machine liquid level control method provided by the present invention has the characteristics of high accuracy and strong real-time performance.
[0024] When the calculated value of the dynamic liquid level is less than the normal range of the dynamic liquid level, it means that to a certain extent, the casing pressure does not match the current working environment, and the current actual casing pressure is greater than the required casing pressure, and the casing pressure value needs to be reduced. At the same time, for the dynamic liquid level, if the difference between the dynamic liquid level and the normal range is larger, it means that the casing pressure deviation is larger. Therefore, the adjustment parameter of the casing pressure adjustment value is determined by the difference between the calculated value of the dynamic liquid level and the normal range of the dynamic liquid level, so that the calculated result is associated with the difference between the dynamic liquid level and the normal range of the dynamic liquid level, so that the calculated value can be more in line with the current working environment, reducing the frequency and number of subsequent adjustments; When the calculated value of the dynamic liquid level is greater than the normal range of the dynamic liquid level, it means that to a certain extent, the casing pressure does not match the current working environment, and the current actual casing pressure is less than the required casing pressure, and the casing pressure value needs to be increased. At the same time, for the dynamic liquid level, if the difference between it and the normal range is greater, it means that the deviation of the casing pressure is greater. Therefore, the adjustment parameters of the casing pressure adjustment value are determined by the difference between the calculated value of the dynamic liquid level and the normal range of the dynamic liquid level, so that the calculated result is associated with the difference between the dynamic liquid level and the normal range of the dynamic liquid level, so that the calculated value can be more in line with the current working environment, reducing the frequency and number of subsequent adjustments.
[0025] When the dynamic liquid level target value is on the left side of the normal range of the dynamic liquid level, it means that to a certain extent, the stroke frequency does not match the current working environment, and the current actual stroke frequency is greater than the required casing pressure, and the stroke frequency value needs to be reduced. At the same time, for the dynamic liquid level, if the difference between the dynamic liquid level and the normal range is larger, it means that the deviation of the stroke frequency is larger. Therefore, the adjustment parameter of the stroke frequency adjustment value is determined by the difference between the casing pressure calculation value and the normal range of casing pressure, so that the calculation result is associated with the difference between the dynamic liquid level and the normal range of the dynamic liquid level, so that the calculated value can be more in line with the current working environment, reducing the frequency and number of subsequent adjustments; When the dynamic liquid level target value is on the right side of the normal range of the dynamic liquid level, it means that to a certain extent, the stroke frequency does not match the current working environment, and the current actual stroke frequency is less than the required casing pressure, and the stroke frequency value needs to be increased. At the same time, for the dynamic liquid level, if the difference between it and the normal range is greater, it means that the deviation of the stroke frequency is greater. Therefore, the adjustment parameter of the stroke frequency adjustment value is determined by the difference between the casing pressure calculation value and the normal range of casing pressure, so that the calculated result is associated with the difference between the dynamic liquid level and the normal range of the dynamic liquid level, so that the calculated value can be more in line with the current working environment, reducing the frequency and number of subsequent adjustments.
[0026] When the dynamic liquid level target value is on the left side of the normal range of the dynamic liquid level, it means that to a certain extent, the stroke does not match the current working environment, the current actual stroke is greater than the required casing pressure, and the stroke value needs to be reduced. At the same time, for the dynamic liquid level, if the difference between the normal range is larger, it means that the deviation of the stroke is larger. Therefore, the adjustment parameter of the stroke adjustment value is determined by the difference between the calculated value of the stroke and the normal range of the stroke, so that the calculated result is associated with the difference between the dynamic liquid level and the normal range of the dynamic liquid level, so that the calculated value can be more in line with the current working environment, reducing the frequency and number of subsequent adjustments; When the dynamic liquid level target value is on the right side of the normal range of the dynamic liquid level, it means that to a certain extent, the stroke does not match the current working environment, the current actual stroke is less than the required casing pressure, and the stroke value needs to be increased. At the same time, for the dynamic liquid level, if the difference between it and the normal range is greater, the deviation of the stroke is greater. Therefore, the adjustment parameters of the stroke adjustment value are determined by the difference between the stroke calculation and the normal range of the stroke, so that the calculation result is associated with the difference between the dynamic liquid level and the normal range of the dynamic liquid level, so that the calculated value can be more in line with the current working environment, reducing the frequency and number of subsequent adjustments.
[0027] Compared with traditional theoretical methods and manual testing methods, this method can provide high-precision real-time automatic measurement of dynamic liquid level functions for intelligent oil wells in digital construction, quickly respond to production changes, optimize production parameters, improve production efficiency, prevent blowouts and oil pump damage, reduce safety hazards, and enhance production safety; reduce labor costs, significantly reduce or even eliminate the workload of on-site manual low-pressure testing; increase equipment service life, reduce production costs, achieve refined management, facilitate data statistics and analysis, and improve management level, which is of great significance to improving the overall production efficiency of oil fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a schematic diagram of a downhole pump power diagram solved according to a surface power diagram in an embodiment; Figure 2 It is a flow chart of dynamic liquid level calculation and solution based on the work diagram in the embodiment; Figure 3 It is a multivariate regression calculation flow chart of the dynamic liquid level calibration coefficient in the embodiment; Figure 4 It is a comparison curve diagram of the calculated and measured dynamic liquid levels in the embodiment. DETAILED DESCRIPTION
[0029] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0030] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0031] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.
[0032] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0033] See also Figures 1 to 4 As shown, the present invention provides a method for controlling the hydraulic level of an oil pumping machine based on multivariate regression optimization. As a set of embodiments, the present invention selects the ground dynamometer diagram collection data of a certain oil pumping well for 90 consecutive days to illustrate the scheme.
[0034] The oil pumping machine liquid level control method based on multivariate regression optimization includes Step S1: Based on the surface indicator diagram, combined with the sucker rod string, the length and diameter of the sucker pump, the well fluid density, the sucker rod density and other parameters, the one-dimensional wave equation of the sucker rod string is numerically solved by finite difference, Fourier transform and other methods to calculate the load and displacement at the downhole pump position. One example is: , Among them, U(x,t) represents the displacement function of the sucker rod string at different times t in the x section; a represents the propagation speed of stress wave in the sucker rod string; c represents the viscous damping coefficient.
[0035] Based on the one-dimensional wave equation of the sucker rod string, 90 groups of surface performance diagrams are solved to form the corresponding downhole pump performance diagrams. The downhole pump performance diagrams are numbered 1, 2, ... 90 according to the chronological order of their acquisition.
[0036] Step S2: using the five-point curvature method, filtering eigenvalue and other methods to identify the opening and closing points of the pump valve in the downhole pump performance diagram, that is, Figure 1 The A, B, C, and D points shown are used to calculate the average load of the AD and BC segments respectively. and , the effective lifting liquid column load is , combined with parameters such as well fluid density and plunger area, the initial calculation value of the dynamic liquid level is obtained , the formula is as follows,
[0037] Where ρ is the density of the well fluid, g is the acceleration due to gravity, and A p is the cross-sectional area of the plunger; The preliminary calculation of the 90-day dynamic liquid level is L f0 (d), d=1,2…90, d is the number of days.
[0038] Step S3: Take the data of the previous 30 days as the multivariate regression training set data, and use the ratio of the measured dynamic liquid level to the initially calculated dynamic liquid level as the corresponding dynamic liquid level correction coefficient. Combined with the oil well power diagram characteristics, pumping parameters, well fluid data, pressure data, and pump barrel parameters, after cleaning the abnormal data, perform a correlation analysis between the influencing factors and the correction coefficient. The correlation analysis is measured by calculating the Pearson correlation coefficient between the two variables. The Pearson correlation coefficient of the two H-dimensional vectors x and y is The calculation formula is:
[0039] in, is a real number in [-1,1], x represents the influencing factor of the dynamic liquid level calculation accuracy of the power diagram, x i The first factor affecting the calculation accuracy is i Impact factor, y i Represents x i The corresponding dynamic liquid level calibration coefficient; represents the average value of the impact factor, represents the average value of the dynamic liquid level calibration coefficient, When the value is 1, it means that there is a complete positive correlation between the two random variables; when the value is -1, it means that there is a complete negative correlation between the two random variables; when the value is 0, it means that there is no linear correlation between the two random variables. By limiting the numerical value of the correlation coefficient, the eigenvalues with strong correlation are selected as the main influencing factors of the calculation accuracy of the dynamic liquid level of the power diagram. Assuming that there are n groups of corresponding m dynamic liquid level influencing factors , i=1,2...n, the corresponding dynamic liquid level calibration coefficient is , i=1,2……n.
[0040] In this embodiment, a total of 13 factors are collected. Through correlation analysis and calculation, the parameters with the absolute value of the correlation coefficient between each parameter and the liquid level correction coefficient greater than 0.3 are taken as the main influencing parameters. A total of 9 main influencing parameters including casing pressure, stroke times, stroke, maximum load, minimum load, effective stroke, water content, fullness, and liquid column weight are screened out. Among them, the preset adjustment order is to adjust the casing pressure, stroke times, stroke, maximum load, minimum load, effective stroke, water content, fullness, and liquid column weight one by one in sequence.
[0041] Step S4: Use 9 items of dynamic liquid level influencing factor data for normalization processing, establish a dynamic liquid level coefficient regression fitting model through the method of multiple regression, and judge the degree of fitting according to the fitting evaluation index R square value. The value range of R square value is between 0 and 1, and the preset value is 0.75. The larger the R square value, the better the regression model fits the observed value. The degree of fitting is judged according to the fitting evaluation index R square value. Whether the R square value is greater than the preset value, if it does not meet the requirements, readjust the influencing factors and perform multiple regression fitting again until the degree of fitting meets the requirements. If it meets the requirements, establish the calibration coefficient multiple regression solution formula according to the regression coefficient, and then combine the inverse normalization processing to calculate the dynamic liquid level calibration coefficient of the verification data according to the formula.
[0042] The R-square value of this calculation is 0.8046, which satisfies the R-square value greater than the preset value and meets the preset fitting degree. Therefore, the initial multiple regression calculation formula can be obtained as follows:
[0043] Y is the dynamic liquid level calibration coefficient, X1 is the influence factor of the first influencing factor of the dynamic liquid level, the casing pressure, X2 is the influence factor of the second influencing factor of the dynamic liquid level, the stroke, X3 is the influence factor of the third influencing factor of the dynamic liquid level, the stroke, X m is the influencing factor of the mth influencing factor of the dynamic liquid surface; is the basic value of the regression coefficient, is the regression coefficient of the first influencing factor, is the regression coefficient of the second influencing factor... is the regression coefficient of the mth influencing factor. The solution is generally solved by the least squares principle. If there are n groups of m dynamic liquid surface influencing factors ( , i=1,2……n), the corresponding dynamic liquid level calibration coefficient is ( , i=1,2……n), then the regression coefficient of each factor It needs to be obtained by solving the following matrix:
[0044] The R-square value is used to measure the goodness of fit of the multiple regression model. The calculation formula is as follows:
[0045] Calibration coefficients calculated for the multiple regression model.
[0046] Calculate the dynamic liquid level calibration coefficient of the verification data, use computer language to write a multivariate regression algorithm program, and realize the sub-item regression coefficients corresponding to the 9 parameters as shown in the table. Table 1 Results of solving the regression coefficients of multiple regression items Parameter name Effective stroke Fullness Maximum load Minimum load stroke Rush Moisture content Casing Pressure Liquid column weight Constant term Regression coefficient 0.3303 -0.2258 0.4191 0.0060 -0.3378 -0.5640 0.0782 0.4019 -0.6597 0.5729 Step S5: Optimize and correct the initial calculation result of the dynamic liquid level using the dynamic liquid level calibration coefficient to improve the accuracy of the dynamic liquid level calculation of the power diagram. Take the data of the last 60 days as the verification data. Combined with the inverse normalization process, use the liquid level calibration coefficient formula fitted in step 4 to solve the calibration coefficient under the corresponding power diagram. Use the dynamic liquid level calibration coefficient to correct the initial calculation value of the dynamic liquid level to obtain the dynamic liquid level calculation value L. The preliminary calculation results of the dynamic liquid level 60 days after optimization and the comparison of the calculation results before and after the correction of the power chart liquid level are shown in Table 2. The comparison curves of the measured dynamic liquid level, the preliminary calculation dynamic liquid level and the corrected dynamic liquid level of each group of data are shown in Table 2. Figure 4 shown.
[0047] Table 2 Comparison of calculation results before and after the correction of the liquid level of the power diagram Serial number Measured dynamic liquid level Initial calculation of moving liquid level Calibration factor Calculate the dynamic liquid level after calibration Initial calculation accuracy Calculate accuracy after calibration 1 674.81 810.32 0.8445 684.35 79.92 98.59 2 674.81 854.37 0.8370 715.14 73.39 94.02 3 674.81 850.96 0.8112 690.28 73.90 97.71 4 674.81 845.92 0.8370 708.07 74.64 95.07 5 674.81 842.66 0.8259 695.93 75.13 96.87 6 674.81 831.09 0.8343 693.34 76.84 97.25 7 674.81 840.01 0.8296 696.91 75.52 96.72 8 664.57 835.34 0.8448 705.67 74.30 93.82 9 664.57 825.00 0.8483 699.84 75.86 94.69 … … … … … … … 60 682.24 823.58 0.8476 698.05 79.28 97.68 According to the calculated dynamic liquid level value and the actual dynamic liquid level value on site, the dynamic liquid level calculation accuracy corresponding to each set of data is calculated; According to statistics, the average accuracy of the initial calculation of the dynamic liquid level of 60 groups of verification sample data is 77.47%, and the accuracy after optimization and correction is 96.84%, indicating that the accuracy of the dynamic liquid level calculation method provided by the present invention is significantly improved.
[0048] The normal range of the dynamic liquid level is (Lmin, Lmax). The dynamic liquid level calculation value L is judged to be normal, including: The dynamic liquid level calculation value is compared with a preset normal range of the dynamic liquid level. When the dynamic liquid level calculation value is within the normal range of the dynamic liquid level, the dynamic liquid level calculation value is normal. When the dynamic liquid level calculation value is not within the normal range of the dynamic liquid level, the dynamic liquid level calculation value is abnormal; Among them, the normal range of dynamic liquid level (Lmin, Lmax) is determined through statistical analysis of historical production data.
[0049] When the dynamic liquid level calculation value is abnormal, the influencing parameters in the initial multiple regression calculation formula are adjusted one by one according to the preset adjustment sequence, including: Collect the initial value T0 and adjustment range (Tmin, Tmax) of casing pressure at the wellhead casing of the oil well; A first adjustment parameter k1 is calculated based on a comparison result between the dynamic liquid level calculation value L and the normal range of the dynamic liquid level, and the casing pressure initial value T0 is adjusted according to the first adjustment parameter to obtain a casing pressure calculation value T; When the calculated value of the dynamic liquid level is less than the normal range of the dynamic liquid level, k1=L / (Lmin-L), and the calculated value of the casing pressure T=T0-1 / k1; When the calculated value of the dynamic liquid level is less than the normal range of the dynamic liquid level, it means that to a certain extent, the casing pressure does not match the current working environment, and the current actual casing pressure is greater than the required casing pressure, and the casing pressure value needs to be reduced. At the same time, for the dynamic liquid level, if the difference between the dynamic liquid level and the normal range is larger, it means that the casing pressure deviation is larger. Therefore, the adjustment parameter of the casing pressure adjustment value is determined by the difference between the calculated value of the dynamic liquid level and the normal range of the dynamic liquid level, so that the calculated result is associated with the difference between the dynamic liquid level and the normal range of the dynamic liquid level, so that the calculated value can be more in line with the current working environment, reducing the frequency and number of subsequent adjustments; When the calculated value of the dynamic liquid level is greater than the normal range of the dynamic liquid level, k1=L / (L-Lmax), and the calculated value of the casing pressure T=T0+1 / k1; When the calculated value of the dynamic liquid level is greater than the normal range of the dynamic liquid level, it means that to a certain extent, the casing pressure does not match the current working environment, and the current actual casing pressure is less than the required casing pressure, and the casing pressure value needs to be increased. At the same time, for the dynamic liquid level, if the difference between it and the normal range is greater, it means that the deviation of the casing pressure is greater. Therefore, the adjustment parameters of the casing pressure adjustment value are determined by the difference between the calculated value of the dynamic liquid level and the normal range of the dynamic liquid level, so that the calculated result is associated with the difference between the dynamic liquid level and the normal range of the dynamic liquid level, so that the calculated value can be more in line with the current working environment, reducing the frequency and number of subsequent adjustments.
[0050] Compare the calculated casing pressure value with the casing pressure adjustment range to determine the casing pressure adjustment value; Based on the casing pressure adjustment value, an adjustment multiple regression calculation formula is obtained; The dynamic liquid level adjustment coefficient is obtained based on the adjustment multiple regression calculation formula; The dynamic liquid level calculation value is corrected according to the dynamic liquid level adjustment coefficient to obtain the dynamic liquid level target value; Step S6: comparing the dynamic liquid level target value with a preset dynamic liquid level normal range. When the dynamic liquid level target value is within the dynamic liquid level normal range, the dynamic liquid level target value is normal. When the dynamic liquid level target value is not within the normal range of the dynamic liquid level, the dynamic liquid level target value is abnormal; When the dynamic liquid level target value is abnormal, the influencing parameters in the initial multiple regression calculation formula are adjusted one by one according to the preset adjustment sequence, including: Collect the initial value N0 and the stroke adjustment range (Nmin, Nmax) of the sucker rod of the pumping unit; The second adjustment parameter k2 is calculated based on the comparison result between the casing pressure calculation value T and the casing pressure normal range, and the initial value N0 of the number of strokes is adjusted according to the second adjustment parameter k2 to obtain the calculated value N of the number of strokes; When the dynamic liquid level target value is on the left side of the normal range of the dynamic liquid level, k2=T / (Tmin-T), the calculated value of the number of strokes N=N0-1 / k2; When the dynamic liquid level target value is on the left side of the normal range of the dynamic liquid level, it means that to a certain extent, the stroke frequency does not match the current working environment, and the current actual stroke frequency is greater than the required casing pressure, and the stroke frequency value needs to be reduced. At the same time, for the dynamic liquid level, if the difference between the dynamic liquid level and the normal range is larger, it means that the deviation of the stroke frequency is larger. Therefore, the adjustment parameter of the stroke frequency adjustment value is determined by the difference between the casing pressure calculation value and the normal range of casing pressure, so that the calculation result is associated with the difference between the dynamic liquid level and the normal range of the dynamic liquid level, so that the calculated value can be more in line with the current working environment, reducing the frequency and number of subsequent adjustments; When the dynamic liquid level target value is on the right side of the normal range of the dynamic liquid level, k2=T / (T-Tmax), the stroke adjustment value N=N0+1 / k2; When the dynamic liquid level target value is on the right side of the normal range of the dynamic liquid level, it means that to a certain extent, the stroke frequency does not match the current working environment, and the current actual stroke frequency is less than the required casing pressure, and the stroke frequency value needs to be increased. At the same time, for the dynamic liquid level, if the difference between the dynamic liquid level and the normal range is larger, it means that the deviation of the stroke frequency is larger. Therefore, the adjustment parameter of the stroke frequency adjustment value is determined by the difference between the casing pressure calculation value and the normal range of casing pressure, so that the calculation result is associated with the difference between the dynamic liquid level and the normal range of the dynamic liquid level, so that the calculated value can be more in line with the current working environment, reducing the frequency and number of subsequent adjustments; Compare the calculated value of strokes with the stroke adjustment range to determine the stroke adjustment value; Based on the stroke adjustment value, the adjusted multiple regression calculation formula is obtained; The dynamic liquid level adjustment coefficient is obtained based on the adjustment multiple regression calculation formula; The dynamic liquid level calculation value is corrected according to the dynamic liquid level adjustment coefficient to obtain the dynamic liquid level target value; The dynamic liquid level target value is compared with a preset dynamic liquid level normal range. When the dynamic liquid level target value is within the dynamic liquid level normal range, the dynamic liquid level target value is normal. When the dynamic liquid level target value is abnormal, the influencing parameters in the initial multiple regression calculation formula are adjusted one by one according to the preset adjustment sequence, including: Collect the initial stroke value S0 and stroke adjustment range (Smin, Smax) of the sucker rod of the pumping unit; Calculate a third adjustment parameter based on a comparison result between the stroke calculation value N and the normal range of strokes, and adjust the stroke initial value S0 according to the third adjustment parameter to obtain the stroke calculation value S; When the dynamic liquid level target value is on the left side of the normal range of the dynamic liquid level, k3=N / (Nmin-N), and the stroke calculation value S=S0-1 / k3; When the dynamic liquid level target value is on the left side of the normal range of the dynamic liquid level, it means that to a certain extent, the stroke does not match the current working environment, the current actual stroke is greater than the required casing pressure, and the stroke value needs to be reduced. At the same time, for the dynamic liquid level, if the difference between the normal range is larger, it means that the deviation of the stroke is larger. Therefore, the adjustment parameter of the stroke adjustment value is determined by the difference between the calculated value of the stroke and the normal range of the stroke, so that the calculated result is associated with the difference between the dynamic liquid level and the normal range of the dynamic liquid level, so that the calculated value can be more in line with the current working environment, reducing the frequency and number of subsequent adjustments; When the dynamic liquid level target value is on the right side of the normal range of the dynamic liquid level, k3=N / (N-Nmax), and the stroke calculation value S=S0+1 / k3; When the dynamic liquid level target value is on the right side of the normal range of the dynamic liquid level, it means that to a certain extent, the stroke does not match the current working environment, and the current actual stroke is less than the required casing pressure, and the stroke value needs to be increased. At the same time, for the dynamic liquid level, if the difference between the dynamic liquid level and the normal range is larger, it means that the deviation of the stroke is larger. Therefore, the adjustment parameter of the stroke adjustment value is determined by the difference between the calculated stroke value and the normal range of the stroke, so that the calculated result is associated with the difference between the dynamic liquid level and the normal range of the dynamic liquid level, so that the calculated value can be more in line with the current working environment, reducing the frequency and number of subsequent adjustments; Compare the calculated stroke value with the stroke adjustment range to determine the stroke adjustment value; Obtaining an adjusted multiple regression calculation formula based on the stroke adjustment value; The dynamic liquid level adjustment coefficient is obtained based on the adjustment multiple regression calculation formula; The initial calculated value of the dynamic liquid level is corrected according to the dynamic liquid level adjustment coefficient to obtain the dynamic liquid level target value; The dynamic liquid level target value is compared with a preset dynamic liquid level normal range. When the dynamic liquid level target value is within the dynamic liquid level normal range, the dynamic liquid level target value is normal. When the dynamic liquid level target value is not within the normal range of the dynamic liquid level, the dynamic liquid level target value is abnormal, and the main influencing factors in the multiple regression calculation formula are continuously adjusted based on the preset adjustment sequence, and the adjustment is stopped when the dynamic liquid level target value is normal.
[0051] When the dynamic liquid level target value is abnormal, it shall be adjusted one by one according to the casing pressure, number of strokes, stroke, maximum load, minimum load, effective stroke, water content, fullness and liquid column weight until the dynamic liquid level target value returns to normal.
[0052] Compared with the prior art, the method for controlling the dynamic liquid level of an oil pumping machine based on multivariate regression optimization provided by the present invention can be used for the background algorithm of the digital construction of oil pumping wells. It can provide a high-precision real-time automatic measurement of the dynamic liquid level function for the intelligent oil wells in the digital construction, quickly respond to production changes, optimize production parameters, improve production efficiency, prevent blowouts and oil pump damage, reduce safety hazards, and enhance production safety; reduce labor costs, and significantly reduce or even eliminate the workload of on-site manual low-pressure testing; increase equipment service life, reduce production costs, realize refined management, facilitate data statistics and analysis, and improve management level, which is of great significance to improving the overall production efficiency of the oil field.
[0053] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
[0054] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for controlling the hydraulic level of an oil pump based on multivariate regression optimization, characterized in that: include: Collect and analyze data on the pumping unit site, obtain several downhole pump performance diagrams, and number several downhole pump performance diagrams; Analyze any of the downhole pump diagrams, obtain the effective lifting fluid column load based on the analysis results, and obtain the initial calculation value of the dynamic liquid level based on the effective lifting fluid column load, well fluid density and plunger area parameters; Collecting a number of initial data corresponding to a number of influencing factors, normalizing the number of initial data, building a dynamic liquid surface coefficient regression fitting model based on the normalized data, and obtaining a dynamic liquid surface calibration coefficient based on the dynamic liquid surface coefficient regression fitting model; Correcting the initial calculated value of the dynamic liquid level according to the dynamic liquid level calibration coefficient to obtain a calculated value of the dynamic liquid level; Determine whether the dynamic liquid level calculation value is normal. When the dynamic liquid level calculation value is abnormal, adjust the influencing parameters in the initial multiple regression calculation formula one by one in sequence according to a preset adjustment sequence to obtain an adjusted multiple regression calculation formula, obtain a dynamic liquid level adjustment coefficient based on the adjusted multiple regression calculation formula, and then obtain a dynamic liquid level target value according to the dynamic liquid level adjustment coefficient and the dynamic liquid level calculation value; Determine whether the dynamic liquid level target value is normal, and determine whether to continue adjusting the main influencing factors in the multivariate regression calculation formula based on the preset adjustment sequence according to the judgment result, and stop adjusting when the dynamic liquid level target value is normal.
2. The method for controlling the oil pumping motor fluid level based on multivariate regression optimization according to claim 1, characterized in that: Obtaining a number of said downhole pump performance diagrams, including, Collect the ground indicator diagram of the oil pumping unit; The surface dynamometer diagram is analyzed and the one-dimensional wave equation of the sucker rod string is solved by the finite difference method to obtain the load and displacement at the downhole pump position; The downhole pump diagram is obtained based on load, displacement, sucker rod string, sucker pump length, sucker pump diameter, well fluid density and sucker rod density.
3. The method for controlling the oil pumping motor fluid level based on multivariate regression optimization according to claim 2 is characterized in that: Obtaining the effective lifting liquid column load includes: Identify the pump valve opening and closing points of any of the downhole pump performance diagrams, and obtain the load endpoint A, load endpoint B, load endpoint C, and load endpoint D of any of the downhole pump performance diagrams, wherein load endpoint A is the left endpoint of the load line under the downhole pump performance diagram, load endpoint D is the right endpoint of the load line under the downhole pump performance diagram, load endpoint B is the left endpoint of the load line on the downhole pump performance diagram, and load endpoint C is the right endpoint of the load line on the downhole pump performance diagram; Get the average load value of the AD segment; Get the average load value of the BC segment; The effective lifting liquid column load of the corresponding downhole pump diagram is determined according to the load average value of the AD section and the load average value of the BC section.
4. The method for controlling the oil pumping motor fluid level based on multivariate regression optimization according to claim 3 is characterized in that: Obtaining the initial value of the dynamic liquid level, including: Identify the opening and closing points of pump valves on the downhole pump performance diagram to obtain the effective lifting liquid column load; The obtained effective lifting liquid column load is solved together with the well fluid density and the plunger area parameter to obtain the initial calculation value of the dynamic liquid level.
5. The method for controlling the oil pumping motor fluid level based on multivariate regression optimization according to claim 4 is characterized in that: Obtaining the dynamic liquid level calibration coefficient includes: Collect some initial data corresponding to some influencing factors; Normalizing a number of initial data of any influencing factor to obtain a number of processed data, and determining the any influencing factor based on the number of processed data; The dynamic liquid surface coefficient regression fitting model is established by using a multiple regression method and several influencing factors; The dynamic liquid level calibration coefficient is determined based on the dynamic liquid level coefficient regression fitting model.
6. The method for controlling the oil pumping motor fluid level based on multivariate regression optimization according to claim 5, characterized in that: Get dynamic liquid level calculation values, including, The dynamic liquid level calibration coefficient is determined jointly with the obtained dynamic liquid level initial value, wherein different work diagrams correspond to different calibration coefficients.
7. The method for controlling the oil pumping motor fluid level based on multivariate regression optimization according to claim 6, characterized in that: Determine whether the dynamic liquid level calculation value is normal, including: The dynamic liquid level calculation value is compared with the normal range of the dynamic liquid level. When the dynamic liquid level calculation value is within the normal range of the dynamic liquid level, the dynamic liquid level calculation value is normal; When the dynamic liquid level calculation value is not within the normal range of the dynamic liquid level, the dynamic liquid level calculation value is abnormal; Among them, the normal range of dynamic liquid level is determined through statistical analysis of historical production data.
8. The method for controlling the oil pumping motor fluid level based on multivariate regression optimization according to claim 7, characterized in that: When the dynamic liquid level calculation value is abnormal, the influencing parameters in the initial multiple regression calculation formula are adjusted one by one in sequence according to the preset adjustment sequence, including: Collect the initial value and adjustment range of casing pressure of oil wellhead casing; A first adjustment parameter is calculated based on a comparison result between the dynamic liquid level calculation value and the dynamic liquid level normal range, and the casing pressure initial value is adjusted according to the first adjustment parameter to obtain a casing pressure adjustment value.
9. The method for controlling the oil pumping motor fluid level based on multivariate regression optimization according to claim 8, characterized in that: Obtaining the casing pressure adjustment value, include, Determining whether the dynamic liquid level calculation value is on the left side or the right side of the normal range of the dynamic liquid level; Determine the first adjustment parameter according to the ratio of the excess value of the dynamic liquid level calculation value to itself; The casing pressure adjustment value is determined by combining the first adjustment parameter with the positional relationship between the dynamic liquid level calculation value and the normal range of the dynamic liquid level.
10. The method for controlling the oil pumping motor fluid level based on multivariate regression optimization according to claim 9, characterized in that: Determining whether the dynamic liquid level target value is normal includes: Obtaining an adjustment multivariate regression calculation formula based on the casing pressure adjustment value; The dynamic liquid level adjustment coefficient is obtained based on the adjustment multiple regression calculation formula; Correcting the dynamic liquid level calculation value according to the dynamic liquid level adjustment coefficient to obtain a dynamic liquid level target value; The target value of the dynamic liquid level is compared with the normal range of the dynamic liquid level. When the target value of the dynamic liquid level is within the normal range of the dynamic liquid level, the target value of the dynamic liquid level is normal. When the dynamic liquid level target value is not within the normal range of the dynamic liquid level, the dynamic liquid level target value is abnormal.
11. The method for controlling the oil pumping motor fluid level based on multivariate regression optimization according to claim 10, characterized in that: When the dynamic liquid level target value is abnormal, the influencing parameters in the initial multiple regression calculation formula are adjusted one by one in sequence according to the preset adjustment sequence, including: Collect the initial value and adjustment range of the stroke frequency of the sucker rod of the pumping unit; A second adjustment parameter is calculated based on a comparison result between the casing pressure adjustment value and the normal casing pressure range, and the stroke frequency initial value is adjusted according to the second adjustment parameter to obtain a stroke frequency adjustment value.
12. The method for controlling the oil pumping motor fluid level based on multivariate regression optimization according to claim 11, characterized in that: Obtaining the stroke adjustment value, include, Determine whether the dynamic liquid level target value is on the left or right side of the normal range of the dynamic liquid level; Determine the second adjustment parameter according to the ratio of the excess value of the casing pressure calculation value to itself; The stroke frequency adjustment value is determined by combining a second adjustment parameter according to the positional relationship between the casing pressure calculation value and the casing pressure normal range.
13. The method for controlling the oil pumping motor fluid level based on multivariate regression optimization according to claim 12, characterized in that: Determine whether the dynamic liquid level target value is normal, including: Obtaining an adjustment multiple regression calculation formula based on the stroke adjustment value; The dynamic liquid level adjustment coefficient is obtained based on the adjustment multiple regression calculation formula; The dynamic liquid level calculation value is corrected according to the dynamic liquid level adjustment coefficient to obtain the dynamic liquid level target value; The dynamic liquid level target value is compared with the dynamic liquid level normal range. When the dynamic liquid level target value is within the dynamic liquid level normal range, the dynamic liquid level target value is normal. When the dynamic liquid level target value is not within the normal range of the dynamic liquid level, the dynamic liquid level target value is abnormal.
14. The method for controlling the oil pumping motor fluid level based on multivariate regression optimization according to claim 13, characterized in that: When the dynamic liquid level target value is abnormal, the influencing parameters in the initial multiple regression calculation formula are adjusted one by one according to the preset adjustment sequence, including: Collect the initial stroke value and stroke adjustment range of the sucker rod of the pumping unit; A third adjustment parameter is calculated based on a comparison result between the stroke adjustment value and the stroke adjustment range, and the stroke initial value is adjusted according to the third adjustment parameter to obtain a stroke adjustment value.
15. The method for controlling the oil pumping motor fluid level based on multivariate regression optimization according to claim 14, characterized in that: Obtaining the stroke adjustment value, include, Determine whether the dynamic liquid level target value is on the left or right side of the normal range of the dynamic liquid level; Determine the third adjustment parameter according to the ratio of the excess value of the stroke frequency calculation value to itself; The stroke adjustment value is determined according to the positional relationship between the stroke calculation value and the normal range of stroke frequency in conjunction with the third adjustment parameter.
16. The method for controlling the oil pumping motor fluid level based on multivariate regression optimization according to claim 15, characterized in that: Determine whether the dynamic liquid level target value is normal, including: Obtaining an adjusted multiple regression calculation formula based on the stroke adjustment value; The dynamic liquid level adjustment coefficient is obtained based on the adjustment multiple regression calculation formula; The dynamic liquid level calculation value is corrected according to the dynamic liquid level adjustment coefficient to obtain the dynamic liquid level target value; The dynamic liquid level target value is compared with a preset dynamic liquid level normal range. When the dynamic liquid level target value is within the dynamic liquid level normal range, the dynamic liquid level target value is normal. When the dynamic liquid level target value is not within the normal range of the dynamic liquid level, the dynamic liquid level target value is abnormal, and the main influencing factors in the multiple regression calculation formula are continuously adjusted based on the preset adjustment sequence, and the adjustment is stopped when the dynamic liquid level target value is normal.
Citation Information
Patent Citations
Continuous measurement method for working fluid level of rod-pumped well
CN118223870A
Methods and systems for obtaining real-time online data on dynamic fluid levels in pumping unit wells
CN102268989A
Method and system for measuring movable liquid surface of oil well
CN102877832A
Double-flow well test analysis method and double-flow well test analysis system on basis of indicator diagrams
CN103899300A
Method for measuring working fluid level of rod-pumped well
CN105257279A