Method for calculating oil well liquid production capacity through electrical indicator diagram
By collecting and processing the real-time electric power diagram data of the motor, combining dynamic pressure fluctuations and periodic segmentation algorithms, the oil well liquid production is calculated using a multi-parameter fusion model, which solves the problems of insufficient accuracy and poor adaptability in the existing technology, and achieves high-precision liquid production monitoring.
Patent Information
- Application Number
- CN202510366516.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-07-04
AI Technical Summary
When calculating the fluid production of oil wells using motor operating parameters, the prior art is insufficient in the accuracy and poor adaptability to complex working conditions, making it difficult to meet the needs of high-precision monitoring.
Real-time electric power diagram data of the motor is collected, dynamic noise filtering and adaptive baseline calibration are performed, real-time pressure fluctuations of the pump column are calculated, and the effective period and non-effective period are distinguished by the periodic segmentation algorithm, and the liquid production is calculated using a multi-parameter fusion model combined with pump efficiency parameters.
It improves the accuracy and reliability of oil well liquid production calculation, adapts to different working conditions, and meets monitoring needs under complex conditions.
Smart Images

Figure CN120256841A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oil extraction, and more specifically, the present invention relates to a method for calculating the liquid production of an oil well using an electric work diagram. Background Art
[0002] During the process of oil extraction, accurately measuring the liquid production of an oil well is a key link in evaluating the production efficiency of the oil well and formulating a reasonable exploitation strategy. Traditional methods usually rely on direct measurement devices such as flow meters, but these devices are complex to install, costly, and vulnerable to downhole environmental influences. In recent years, with the wide application of motor drive technology in pumping units, indirect measurement methods based on motor operating parameters have gradually received attention. These methods infer the production status of the oil well by analyzing parameters such as the current and voltage of the motor, and have the advantages of low cost and simple operation. However, when the existing technology calculates the liquid production of an oil well using motor operating parameters, there are often problems such as insufficient accuracy and poor adaptability to complex working conditions, making it difficult to meet the requirements of high-precision liquid production monitoring in actual production.
[0003] In the process of implementing the embodiments of the present invention, the inventors found that there are at least the following problems or defects in the existing technology: The traditional method does not analyze the motor operating parameters deeply enough, and fails to make full use of the effective information in the electric work diagram data, resulting in limited accuracy of liquid production calculation; at the same time, the existing technology has insufficient adaptability to dynamic working conditions and cannot accurately distinguish the effective production cycle from the non-effective cycle, thereby affecting the reliability of the calculation results. Summary of the Invention
[0004] The present invention provides a method for calculating the liquid production of an oil well using an electric work diagram, including: S1. Collect real-time electric work diagram data of the motor, and the electric work diagram data includes current , voltage , power parameters and time series ; S2. Preprocess the electric work diagram data to generate standardized electric work diagram data; S3. According to the standardized electric work diagram data, calculate the real-time pressure fluctuation value of the oil well pump string through a dynamic pressure fluctuation algorithm ; S4. Based on the real-time pressure fluctuation value , adopt a cycle segmentation algorithm to divide the effective cycle and non-effective cycle of the pump string movement; S5. Extract the pressure fluctuation characteristic parameters within the effective cycle, including the maximum pressure gradient , cycle duration and pressure amplitude ; S6. Input the pressure fluctuation characteristic parameters into the multi-parameter fusion model and combine with the oil well pump efficiency parameters , and output the calculation result of the liquid production of the oil well .
[0005] Furthermore, the preprocessing in S2 includes: S21. Execute the dynamic noise filtering algorithm on the electric work diagram data, and the filtering formula is:
[0006] where is the filtered current value, is the dynamic weight coefficient, N is the sliding window radius, is the original current value; S22. Execute the adaptive baseline calibration algorithm on the filtered electric work diagram data, and the calibration formula is:
[0007] where is the calibrated voltage value, is the filtered voltage value, and T is the calibration window length.
[0008] Furthermore, the dynamic pressure fluctuation algorithm in S3 includes: S31. Calculate the instantaneous load power of the pump column according to the power parameters in the standardized electric work diagram data, and the formula is:
[0009] where is the real-time power, is the filtered current value, and R is the equivalent resistance of the motor; S32. Convert the instantaneous load power into the real-time pressure fluctuation value , and the conversion formula is:
[0010] where is the proportionality coefficient, is the integral coefficient.
[0011] Furthermore, the period segmentation algorithm in S4 includes: S41. Identify the maximum and minimum points of the real-time pressure fluctuation value through the extreme point detection algorithm; S42. According to the time difference and pressure difference between adjacent maximum and minimum points, judge whether it meets the dynamic threshold judgment condition:
[0012] Among them, is the threshold coefficient, is the average value of pressure fluctuation, and are the times of adjacent extreme points; S43. If the condition is satisfied, then to the interval is marked as the effective period, otherwise it is marked as the non-effective period.
[0013] Furthermore, the proportionality coefficient and the integral coefficient in S32 are calculated by the following formulas:
[0014]
[0015] Among them, and are calibration constants, is the fluid density, is the cross-sectional area of the pump column, is the length of the pump column, is the fluid viscosity, is the reference liquid production rate, is the pump diameter.
[0016] Furthermore, the dynamic threshold judgment condition in S42 further includes: S421. Calculate the sliding window update formula of the average value of pressure fluctuation:
[0017] Among them, is the number of data points in the window, is the attenuation factor, is the time point in the window; S422. The threshold coefficient is dynamically adjusted according to the pump speed The formula is:
[0018] Among them, is the basic threshold, is the adjustment amplitude, is the attenuation rate.
[0019] Furthermore, the extraction of the pressure fluctuation characteristic parameters in S5 includes: S51. The calculation formula of the maximum pressure gradient is:
[0020] Among them, is the time point within the effective period; S52. Cycle duration is the time difference between the maximum value point and the minimum value point within the effective period; S53. Pressure amplitude The calculation formula is:
[0021] Furthermore, the multi-parameter fusion model in S6 is:
[0022] Among them, is the liquid production volume, is the pump efficiency coefficient, is the liquid production volume calibration constant, is the reference liquid production volume, is the correction factor.
[0023] Furthermore, the calculation of the correction factor includes: S91. Generate a correction weight based on the correlation between historical liquid production volume data and pressure amplitude , and the formula is:
[0024] Among them, N is the number of historical data samples, is the pressure amplitude of the nth sample, is the liquid production volume of the nth sample; S92. Correction factor .
[0025] Furthermore, the pump efficiency parameter is generated through the following steps: S101. Real-time collect pump column displacement data and obtain the pump efficiency coefficient through displacement-load curve fitting ; S102. Update the dynamic compensation factor of the pump efficiency coefficient according to the non-linear relationship between the pump speed S and the liquid production volume , and the formula is:
[0026] Among them, is the attenuation coefficient, k is the slope factor, is the pump speed critical value.
[0027] The above embodiments of the present invention have at least the following beneficial effects: By collecting the real-time electric work diagram data of the motor and performing standardization processing, and combining the dynamic pressure fluctuation algorithm and the period segmentation algorithm, the present invention can accurately calculate the real-time pressure fluctuation value of the oil well pump string and effectively distinguish the effective period and the non-effective period of the pump string movement. This method can extract key pressure fluctuation characteristic parameters, such as the maximum pressure gradient, the period duration, and the pressure amplitude, providing high-precision input data for subsequent liquid production calculation. At the same time, based on the calculation method of the multi-parameter fusion model and combined with the oil well pump efficiency parameters, the accuracy and reliability of the liquid production calculation can be further improved to meet the monitoring requirements under complex working conditions.
[0028] In addition, the present invention can also adapt to the working condition changes of different oil wells by dynamically adjusting relevant parameters and thresholds, enhancing the versatility and flexibility of the method. By introducing a correction factor, the calculation results are further optimized to make them closer to the actual production situation, providing strong technical support for the refined management and optimized production of oil wells. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] By referring to the detailed description below with reference to the accompanying drawings, the above and other objects, features, and advantages of the exemplary embodiments of the present invention will become readily understood. In the drawings, several embodiments of the present invention are shown by way of illustration and not limitation, wherein: Figure 1 It is a schematic flowchart of a method for calculating the liquid production of an oil well using an electric work diagram provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0030] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and then implement the present invention, and do not limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to be able to convey the scope of the present invention fully to those skilled in the art.
[0031] Those skilled in the art know that the embodiments of the present invention can be implemented as a system, a device, a device, a method, or a computer program product. Therefore, the present invention can be specifically implemented in the following forms: completely hardware, completely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0032] It should be noted that any number of elements in the drawings is for illustration and not limitation, and any naming is only for distinction and does not have any limiting meaning.
[0033] Next, refer to Figure 1 , Figure 1The flowchart shows a method for calculating the liquid production of an oil well using an electric work diagram provided by an embodiment of the present invention. As Figure 1 shown, a method 100 for calculating the liquid production of an oil well using an electric work diagram includes: S1. Collect real-time electric work diagram data of the motor, where the electric work diagram data includes current , voltage , power parameters and time series ; S2. Preprocess the electric work diagram data to generate standardized electric work diagram data; S3. Calculate the real-time pressure fluctuation value of the oil well pump string through a dynamic pressure fluctuation algorithm based on the standardized electric work diagram data ; S4. Based on the real-time pressure fluctuation value , use a cycle segmentation algorithm to divide the effective cycle and non-effective cycle of the pump string movement; S5. Extract the pressure fluctuation characteristic parameters within the effective cycle, including the maximum pressure gradient , cycle duration and pressure amplitude ; S6. Input the pressure fluctuation characteristic parameters into a multi-parameter fusion model, and combine with the oil well pump efficiency parameters to output the calculation result of the oil well liquid production .
[0034] It should be noted that in the present invention, collecting the real-time electric work diagram data of the motor is a basic step for calculating the liquid production volume of the oil well. The electric work diagram data mainly includes current, voltage, power parameters, and time series, and these data reflect the dynamic characteristics of the motor during operation. By collecting these data, the operating state information of the motor under different working conditions can be obtained, and thus the necessary input for subsequent liquid production volume calculation can be provided. The purpose of the preprocessing step is to standardize the collected original electric work diagram data to eliminate noise and deviation and ensure the accuracy and consistency of the data. The dynamic pressure fluctuation algorithm is used to calculate the real-time pressure fluctuation value of the pump string. This is based on the power parameters in the electric work diagram data, and through a specific mathematical model, the power change is converted into pressure fluctuation, thereby indirectly reflecting the fluid pressure change inside the oil well. The cycle segmentation algorithm is to distinguish the effective cycle and the non-effective cycle of the pump string movement. The effective cycle refers to the cycle in which the pump string completes a full movement under normal working conditions, while the non-effective cycle may include equipment failures, shutdowns, or other abnormal conditions. By extracting the pressure fluctuation characteristic parameters within the effective cycle, such as the maximum pressure gradient, cycle duration, and pressure amplitude, the working state of the pump string and the liquid production situation of the oil well can be further analyzed. Finally, these characteristic parameters are input into the multi-parameter fusion model, and combined with the oil well pump efficiency parameter, the calculation result of the oil well liquid production volume can be output. The oil well pump efficiency parameter is an important indicator reflecting the working efficiency of the pump string. By comprehensively considering various factors, the model can calculate the actual liquid production volume of the oil well more accurately.
[0035] Specifically, the acquisition of electric work diagram data can be achieved through sensors installed on the motor. These sensors can monitor parameters such as current, voltage, and power in real time and convert them into time series data. Current refers to the rate of charge flow through the wire during the operation of the motor, usually measured in amperes (A); voltage refers to the potential difference across the motor, measured in volts (V); the power parameter is the product of current and voltage, reflecting the energy consumption of the motor, measured in watts (W). A time series refers to the variation of these parameters over time. By recording time series data, the operating state of the motor at different time periods can be analyzed. In the preprocessing stage, the dynamic noise filtering algorithm filters the original current value by setting the sliding window radius and dynamic weight coefficient to remove high-frequency noise in the data. The adaptive baseline calibration algorithm calibrates the baseline of the filtered voltage value by calculating the average value within the calibration window length to eliminate the DC offset in the data. In the dynamic pressure fluctuation algorithm, the calculation of the instantaneous load power is based on the relationship between the power parameter and the filtered current value. The power is converted into load power through the equivalent resistance of the motor, thereby reflecting the actual working load of the pump string. The calculation of the real-time pressure fluctuation value converts the instantaneous load power into pressure fluctuation through the proportional coefficient and integral coefficient. The values of the proportional coefficient and integral coefficient can be adjusted according to the specific parameters of the oil well (such as fluid density, pump string cross-sectional area, pump string length, fluid viscosity, etc.) to adapt to different working conditions. The extreme point detection in the period segmentation algorithm is achieved by identifying the maximum and minimum points of the real-time pressure fluctuation value. These extreme points mark a complete cycle of the pump string movement. The dynamic threshold judgment condition determines whether it is an effective cycle based on the time difference and pressure difference between adjacent extreme points. The threshold coefficient can be adjusted according to the average value of the pressure fluctuation to adapt to different pressure change ranges.
[0036] Preferably, when collecting electro - work diagram data, high - precision sensors can be used to improve the accuracy of the data. For example, the accuracy of the current sensor can reach 0.1 A, the accuracy of the voltage sensor can reach 0.1 V, and the accuracy of the power sensor can reach 0.1 W. The sliding window radius can be selected according to the sampling frequency and noise level of the data. For high - frequency sampled data, the sliding window radius can be set to a smaller value, such as 5 data points; for low - frequency sampled data, the sliding window radius can be appropriately increased, such as 10 data points. The dynamic weight coefficient can be adjusted according to the characteristics of the noise to achieve a better filtering effect. When choosing the calibration window length, it can be determined according to the stability of the data and the baseline drift situation, and generally can be set to about 100 data points. In the dynamic pressure fluctuation algorithm, the calculation of the proportional coefficient and the integral coefficient can be optimized according to the fluid characteristics of the oil well. For example, for high - viscosity fluids, the proportional coefficient can be appropriately increased to reflect larger pressure changes; for low - density fluids, the integral coefficient can be appropriately decreased to adapt to smaller pressure fluctuations. In the cycle segmentation algorithm, the detection of extreme points can be achieved by setting a threshold for pressure fluctuations. Only when the pressure fluctuation exceeds this threshold is it considered a valid extreme point. The threshold coefficient in the dynamic threshold judgment condition can be dynamically adjusted according to the pump speed to adapt to the pressure changes under different working conditions. For example, when the pump speed is high, the threshold coefficient can be appropriately increased to avoid misjudgment; when the pump speed is low, the threshold coefficient can be appropriately decreased to improve the detection sensitivity. In addition, machine - learning algorithms can be introduced to classify and identify extreme points, further improving the accuracy of cycle segmentation.
[0037] In some embodiments, the pre - processing in S2 includes: S21. Perform a dynamic noise filtering algorithm on the electro - work diagram data, and the filtering formula is:
[0038] Where, is the filtered current value, is the dynamic weight coefficient, N is the sliding window radius, is the original current value; S22. Perform an adaptive baseline calibration algorithm on the filtered electro - work diagram data, and the calibration formula is:
[0039] Where, is the calibrated voltage value, is the filtered voltage value, and T is the calibration window length.
[0040] It should be noted that the preprocessing step in the present invention is to process the collected original electrogram data to generate standardized electrogram data, thereby providing more accurate input for subsequent calculations. The preprocessing mainly includes two links: dynamic noise filtering and adaptive baseline calibration. The dynamic noise filtering algorithm filters the original current value through a sliding window and a dynamic weight coefficient to remove noise interference and make the current signal smoother. The adaptive baseline calibration algorithm calibrates the filtered voltage value to eliminate the baseline drift in the voltage signal and ensure the accuracy of the voltage data. These preprocessing operations can significantly improve the quality of the electrogram data and lay a foundation for subsequent pressure fluctuation calculation and liquid production estimation.
[0041] Specifically, the radius (N) of the sliding window in the dynamic noise filtering algorithm is set according to the sampling frequency and noise characteristics of the data. The role of the sliding window is to perform local averaging on the original current value to smooth the high-frequency noise in the data. The dynamic weight coefficient ( ) is dynamically adjusted according to the local characteristics of the data to enhance the filtering effect. For example, when there are mutations or outliers in the data, the dynamic weight coefficient can be automatically adjusted to make the filtered current value closer to the true value. The calibration window length (T) in the adaptive baseline calibration algorithm is used to calculate the average baseline level of the filtered voltage value. By subtracting the baseline average from the filtered voltage value, the DC offset in the voltage signal can be eliminated, thereby obtaining the calibrated voltage value. This calibration method can adapt to the voltage drift under different working conditions and ensure the stability of the voltage data.
[0042] Preferably, during the dynamic noise filtering process, different sliding window radii can be selected according to the actual working conditions. For example, for the electrogram data with high-frequency sampling, the sliding window radius can be set to a smaller value (such as 5 data points) to quickly respond to current changes; while for the data with low-frequency sampling, the sliding window radius can be appropriately increased (such as 10 data points) to better smooth the noise. The dynamic weight coefficient can be adaptively adjusted according to the intensity of the noise and the fluctuation characteristics of the data. For example, through machine learning algorithms to analyze the data, the dynamic weight coefficient can be automatically optimized to achieve the best filtering effect. In the adaptive baseline calibration, the calibration window length can be adjusted according to the stability of the voltage signal. For example, for the voltage signal with poor stability, the calibration window length can be appropriately increased (such as 200 data points) to more accurately calculate the baseline level. In addition, a multi-scale analysis method can be introduced to perform hierarchical filtering on the noise in different frequency bands to further improve the accuracy and efficiency of the preprocessing.
[0043] In some embodiments, the dynamic pressure fluctuation algorithm in S3 includes: S31. Calculate the instantaneous load power of the pump column according to the power parameters in the standardized electrogram data , the formula is:
[0044] Wherein, is the real-time power, is the filtered current value, and R is the equivalent resistance of the motor; S32. Convert the instantaneous load power into a real-time pressure fluctuation value , and the conversion formula is:
[0045] Wherein, is the proportional coefficient, is the integral coefficient.
[0046] It should be noted that the dynamic pressure fluctuation algorithm in the present invention calculates the real-time pressure fluctuation value of the pump string based on the power parameters in the standardized electric work diagram data. The core of this algorithm is to convert the power change in the electric work diagram into the pressure fluctuation of the pump string, so as to indirectly reflect the fluid pressure change inside the oil well. By calculating the instantaneous load power and converting it into the pressure fluctuation value, key intermediate data can be provided for the subsequent calculation of the liquid production volume of the oil well. This process involves the setting of the proportional coefficient and the integral coefficient, and the values of these coefficients need to be adjusted according to the specific parameters of the oil well to ensure the accuracy and reliability of the calculation results.
[0047] Specifically, the instantaneous load power in the dynamic pressure fluctuation algorithm is calculated through the relationship between the real-time power and the filtered current value. The real-time power refers to the actual power output of the motor at a certain moment, and the filtered current value is the current data after preprocessing, which can more accurately reflect the actual operating state of the motor. The equivalent resistance of the motor is a simplified model of the internal resistance of the motor, which is used to quantify the relationship between current and power. The proportional coefficient and the integral coefficient are key parameters for converting the instantaneous load power into the pressure fluctuation value, and their values depend on parameters such as the fluid density of the oil well, the cross-sectional area of the pump string, the length of the pump string, and the fluid viscosity. The proportional coefficient is mainly used to adjust the linear relationship between the power change and the pressure fluctuation, while the integral coefficient is used to consider the time accumulation effect. The setting of these parameters needs to be calibrated according to the specific working conditions of the oil well to ensure that the pressure fluctuation value can accurately reflect the actual pressure change inside the oil well.
[0048] Preferably, when calculating the instantaneous load power, the power and current data of the motor can be collected in real time through a high-precision sensor, and the noise interference can be eliminated through a filtering algorithm to improve the accuracy of the data. For the setting of the proportional coefficient and the integral coefficient, it can be optimized according to the fluid characteristics of the oil well. For example, for high-viscosity fluids, the proportional coefficient can be appropriately increased to reflect larger pressure changes; for low-density fluids, the integral coefficient can be appropriately decreased to adapt to smaller pressure fluctuations.
[0049] Furthermore, the optimal values of these coefficients can also be determined by the method of experimental calibration. For example, under known liquid production and pressure conditions, by adjusting the proportional coefficient and the integral coefficient, the calculated pressure fluctuation value is made closest to the actual measured value. As an alternative, a machine learning algorithm can be introduced to automatically optimize the proportional coefficient and the integral coefficient based on historical data, thereby further improving the accuracy and adaptability of the pressure fluctuation calculation.
[0050] In some embodiments, the period segmentation algorithm in S4 includes: S41. Identifying the maximum and minimum points of the real-time pressure fluctuation value through an extreme point detection algorithm ; S42. Judging whether the dynamic threshold judgment condition is satisfied according to the time difference and pressure difference between adjacent maximum and minimum points:
[0051] wherein, is the threshold coefficient, is the average value of the pressure fluctuation, and are the times of adjacent extreme points; S43. If the condition is satisfied, then the to interval is marked as a valid period, otherwise it is marked as an invalid period.
[0052] It should be noted that the period segmentation algorithm in the present invention divides the pump column movement into valid periods and invalid periods through the detection of extreme points of the real-time pressure fluctuation value and the dynamic threshold judgment. A valid period refers to the period in which the pump column completes a complete movement in the normal working state, usually corresponding to the normal liquid production process of the oil well; while an invalid period may include equipment failures, shutdowns or other abnormal conditions. By identifying the extreme points and combining the dynamic threshold judgment conditions, these two types of periods can be accurately distinguished, thereby providing a reliable time period for the subsequent liquid production calculation. This process is judged based on the time difference and pressure difference between adjacent extreme points and can adapt to the pressure fluctuation characteristics under different working conditions.
[0053] Specifically, the extreme point detection algorithm is used to identify the maximum and minimum points in the real-time pressure fluctuation values. These extreme points are the local highest and lowest points of the pressure fluctuation curve, marking the start and end of a complete cycle of the pump column movement. The dynamic threshold judgment condition determines whether it is a valid cycle based on the time difference and pressure difference between adjacent extreme points. The threshold coefficient is an important parameter that can be dynamically adjusted according to the mean value of the pressure fluctuation to adapt to different pressure change ranges. The mean value of the pressure fluctuation is obtained by calculating the average of the pressure fluctuation values within a window, which is used to reflect the pressure change level under the current working conditions. By setting reasonable threshold coefficients and mean values of the pressure fluctuation, the valid cycles and non-valid cycles can be effectively distinguished, thereby improving the accuracy of the liquid production calculation.
[0054] Preferably, during the extreme point detection process, false extreme points caused by noise can be filtered out by setting a minimum change threshold for the pressure fluctuation. For example, only when the pressure fluctuation exceeds a certain set value (such as 0.1 MPa) is it considered a valid extreme point. For the dynamic threshold judgment condition, the threshold coefficient can be dynamically adjusted according to the pump speed. For example, when the pump speed is high, the pressure fluctuation is relatively intense, and the threshold coefficient can be appropriately increased; when the pump speed is low, the pressure fluctuation is small, and the threshold coefficient can be appropriately decreased.
[0055] Furthermore, the concept of a time window can be introduced to limit the time interval between extreme points to avoid misjudgment caused by overly dense extreme points. As an alternative, machine learning algorithms can be combined to classify and identify extreme points, further improving the accuracy and adaptability of cycle segmentation. For example, by training a neural network model, the characteristic patterns of valid cycles and non-valid cycles can be automatically identified, thereby achieving intelligent cycle segmentation.
[0056] In some embodiments, the proportionality coefficient and the integral coefficient in the S32 are calculated as follows:
[0057]
[0058] where and are calibration constants, is the fluid density, is the cross-sectional area of the pump column, is the length of the pump column, is the fluid viscosity, is the reference liquid production, is the pump diameter.
[0059] It should be noted that the calculation methods of the proportional coefficient and the integral coefficient in the present invention are based on the physical parameters and fluid characteristics of the oil well, and specific formulas are used to determine the values of these coefficients, so as to achieve accurate calculation of the real-time pressure fluctuation value. The proportional coefficient and the integral coefficient are key parameters in the dynamic pressure fluctuation algorithm, and they directly affect the calculation accuracy of the pressure fluctuation value. The proportional coefficient is mainly used to convert the instantaneous load power into the amplitude of the pressure fluctuation, while the integral coefficient takes into account the time accumulation effect to ensure that the pressure fluctuation value can reflect the dynamic changes of the pump column over a period of time. The calculation formulas of these coefficients involve multiple parameters, such as fluid density, pump column cross-sectional area, pump column length, fluid viscosity, reference liquid production volume, pump diameter, etc. These parameters reflect the specific working conditions of the oil well. Therefore, the proportional coefficient and the integral coefficient calculated through these parameters can adapt to the actual situations of different oil wells.
[0060] Specifically, in the calculation formula of the proportional coefficient, the fluid density ( ) is the ratio of the mass to the volume of the fluid, reflecting the compactness of the fluid; the pump column cross-sectional area (A) is the cross-sectional area of the pump column and is related to the size of the pump column; the pump column length (L) is the total length of the pump column, reflecting the size characteristics of the pump column. In the calculation formula of the integral coefficient, the fluid viscosity ( ) is the resistance characteristic when the fluid flows, affecting the flow behavior of the fluid; the reference liquid production volume ( ) is the liquid production volume of the oil well under standard working conditions and is used for calibration calculation; the pump diameter (D) is the diameter of the pump column, affecting the liquid drainage capacity of the pump column. The values of these parameters can be obtained through actual measurement or design parameters of the oil well. The calibration constants ( and ) are constants obtained through experiments or experience and are used to adjust the calculation results of the proportional coefficient and the integral coefficient to make them more in line with the actual working conditions. In practical applications, the settings of these parameters need to be adjusted according to the specific situation of the oil well to ensure the accuracy of the calculation results.
[0061] Preferably, when calculating the proportional coefficient and the integral coefficient, the values of the calibration constants ( and ) can be determined by the method of experimental calibration. For example, when the liquid production volume and the pressure fluctuation are known, the calibration constants can be adjusted to make the calculated pressure fluctuation value closest to the actual measured value. In addition, for parameters such as fluid density and fluid viscosity, they can be obtained through on-site sampling analysis or by referring to relevant materials.
[0062] Furthermore, in practical applications, if the operating conditions of the oil well change (such as changes in fluid properties or pump string wear), the proportional coefficient and integral coefficient can be recalculated to adapt to the new operating conditions. As an alternative, machine learning algorithms can be introduced to automatically optimize the values of the proportional coefficient and integral coefficient based on historical data, thereby further improving the accuracy and adaptability of pressure fluctuation calculation. For example, by collecting the operating data of different oil wells, a machine learning model can be trained to automatically output the optimal proportional coefficient and integral coefficient according to the input oil well parameters.
[0063] In some embodiments, the dynamic threshold judgment conditions in S42 further include: S421. Calculate the sliding window update formula for the mean pressure fluctuation:
[0064] Where, is the number of data points in the window, is the decay factor, is the time point in the window; S422. Threshold coefficient is dynamically adjusted according to the pump speed The formula is:
[0065] Where, is the base threshold, is the adjustment amplitude, is the decay rate.
[0066] It should be noted that the setting of the dynamic threshold judgment conditions in the present invention is to more accurately identify the effective period and non-effective period, thereby improving the reliability of oil well liquid production calculation. The dynamic threshold judgment conditions can dynamically optimize the judgment conditions according to real-time data through the sliding window update formula for calculating the mean pressure fluctuation and the dynamic adjustment formula of the threshold coefficient. The sliding window update formula is used to update the mean of the pressure fluctuation in real time to reflect the pressure change level under the current operating conditions; while the dynamic adjustment formula of the threshold coefficient dynamically adjusts the threshold according to the pump speed so that it can adapt to the pressure fluctuation characteristics under different operating conditions. This dynamic adjustment mechanism can effectively avoid misjudgment caused by fixed thresholds and improve the accuracy of cycle segmentation.
[0067] Specifically, the sliding window update formula introduces a decay factor to perform weighted averaging on the pressure fluctuation values in the window, making the recent data contribute more to the mean, so as to quickly respond to the changes in pressure fluctuation. The decay factor ( ) is a parameter between 0 and 1, which is used to control the weight decay speed of the data. The smaller its value, the higher the sensitivity to recent data. In the dynamic adjustment formula of the threshold coefficient, the base threshold ( ) is the reference value set according to the initial working condition of the oil well and is used to determine the starting level of the threshold; the adjustment amplitude ( ), and the attenuation rate ( ), then dynamically adjust the threshold coefficient according to the change of the pump speed (S), so that it can adapt to the pressure fluctuation characteristics at different pump speeds. The pump speed refers to the number of reciprocating motions of the pump column per unit time and is an important parameter affecting the liquid production efficiency of the oil well. By dynamically adjusting the threshold coefficient, it can be ensured that the judgment conditions of the extreme points always remain reasonable at different pump speeds, thereby improving the accuracy of effective cycle identification.
[0068] Preferably, when setting the sliding window update formula, the appropriate window length and attenuation factor can be selected according to the actual working condition of the oil well. For example, for an oil well with relatively stable pressure fluctuations, a longer window length (such as 100 data points) and a smaller attenuation factor (such as 0.9) can be adopted to improve the stability of the mean value; while for an oil well with frequent pressure fluctuations, a shorter window length (such as 50 data points) and a larger attenuation factor (such as 0.8) can be adopted to quickly respond to pressure changes. In the dynamic adjustment of the threshold coefficient, the basic threshold, adjustment amplitude, and attenuation rate can be optimized according to the historical data of the oil well. For example, by analyzing the pressure fluctuation characteristics at different pump speeds, the optimal basic threshold and adjustment amplitude can be determined, so that the threshold coefficient can better adapt to the actual operating state of the oil well. As an alternative, an adaptive algorithm can be introduced to automatically adjust the sliding window length and attenuation factor according to real-time data, further improving the adaptability and accuracy of the dynamic threshold judgment conditions.
[0069] In some embodiments, the extraction of the pressure fluctuation characteristic parameters in S5 includes: S51. Maximum pressure gradient The calculation formula is:
[0070] Wherein, is the time point within the effective cycle; S52. Cycle duration is the time difference between the maximum value point and the minimum value point within the effective cycle; S53. Pressure amplitude The calculation formula is:
[0071] It should be noted that the pressure fluctuation characteristic parameters extracted in the present invention are key indicators for characterizing the movement of the pump string within the effective period. These parameters include the maximum pressure gradient, the period duration, and the pressure amplitude. The maximum pressure gradient reflects the rate of pressure change, the period duration represents the length of the effective period, and the pressure amplitude represents the range of pressure fluctuations. By calculating these characteristic parameters, the operating state of the pump string within the effective period can be more comprehensively described, providing an important basis for subsequent liquid production calculation. The calculation of these parameters is based on the pressure fluctuation data within the effective period and is obtained through data analysis and processing, which can effectively reflect the fluid dynamic changes inside the oil well.
[0072] Specifically, the maximum pressure gradient is obtained by calculating the pressure change rate between adjacent time points within the effective period. It is the steepest part of the pressure fluctuation curve, reflecting the severity of pressure change during the movement of the pump string. The period duration is the time difference from the maximum value point to the minimum value point, indicating the time required for the pump string to complete one full movement. The pressure amplitude is the pressure difference between the maximum value point and the minimum value point, reflecting the range of pressure fluctuations. In practical applications, the calculation of these parameters needs to be accurately calculated based on the data points within the effective period. For example, the maximum pressure gradient can be obtained by performing difference processing on the pressure fluctuation data, the period duration is directly calculated through timestamps, and the pressure amplitude is determined by calculating the difference between the maximum value and the minimum value. The calculation of these parameters needs to ensure the accuracy and integrity of the data to avoid calculation errors caused by data quality problems.
[0073] Preferably, when calculating the maximum pressure gradient, the pressure fluctuation data can be smoothed to reduce the influence of noise on gradient calculation. For example, methods such as moving average or low-pass filtering can be used to preprocess the data and then calculate the gradient. For the calculation of the period duration, the time of the maximum value point and the minimum value point can be accurately recorded through timestamps to improve time accuracy. When calculating the pressure amplitude, multiple samplings of the maximum value and the minimum value can be considered, and the average value can be taken to improve the accuracy of the amplitude. In addition, machine learning algorithms can be introduced to optimize the extraction of these characteristic parameters. For example, by training a neural network model, the key characteristic parameters within the effective period can be automatically identified and extracted, thereby improving the efficiency and accuracy of parameter extraction.
[0074] In some embodiments, the multi-parameter fusion model in S6 is:
[0075] wherein, is the liquid production volume, is the pump efficiency coefficient, is the liquid production volume calibration constant, is the reference liquid production volume, is the correction factor.
[0076] It should be noted that in the present invention, the multi-parameter fusion model is the core part for combining the extracted pressure fluctuation characteristic parameters with the oil well pump efficiency parameters to output the calculation result of the oil well liquid production. By comprehensively considering multiple key parameters, this model can more accurately reflect the actual liquid production situation of the oil well. Among them, the pump efficiency coefficient is an important indicator to measure the working efficiency of the pump string, reflecting the effective liquid drainage capacity of the pump string during actual operation; the liquid production calibration constant and the correction factor are used to adjust and optimize the model to ensure the accuracy and reliability of the calculation result. Through this multi-parameter fusion method, the accuracy of the oil well liquid production calculation can be effectively improved to meet the oil well production requirements under different working conditions.
[0077] Specifically, the pump efficiency coefficient in the multi-parameter fusion model is calculated based on the actual operation data of the pump string, reflecting the working efficiency of the pump string under different working conditions. The liquid production calibration constant is a fixed parameter calibrated through experiments or historical data, used to adjust the reference liquid production level of the model. The correction factor is a parameter dynamically adjusted according to the correlation between the pressure amplitude and historical liquid production data, used to compensate for the errors in the model calculation. In the model, characteristic parameters such as the maximum pressure gradient, cycle duration, and pressure amplitude reflect the dynamic characteristics of the pump string movement, while the pump efficiency coefficient provides information on the actual working efficiency of the pump string. By organically combining these parameters, the model can more comprehensively reflect the liquid production situation of the oil well. In practical applications, the pump efficiency coefficient can be calculated by real-time monitoring of the displacement and load data of the pump string, the liquid production calibration constant is set according to the initial liquid production of the oil well and the pump string parameters, and the correction factor can be obtained through statistical analysis of historical data.
[0078] Preferably, when setting the multi-parameter fusion model, the liquid production calibration constant can be adjusted according to the specific working conditions of the oil well. For example, for newly developed oil wells, a lower calibration constant can be adopted, and gradually adjusted to a more accurate value as the oil well production data accumulates. When calculating the correction factor, more historical data samples can be introduced to improve the accuracy of the correction factor. For example, by analyzing the liquid production and pressure amplitude data in the past year, the correction weight can be calculated to obtain a more reliable correction factor. In addition, machine learning algorithms can also be considered to optimize the multi-parameter fusion model. For example, by training a neural network model to automatically learn the complex relationships between different parameters, the accuracy and adaptability of the liquid production calculation can be further improved.
[0079] In some embodiments, the calculation of the correction factor includes: S91. Generate a correction weight according to the correlation between historical liquid production data and pressure amplitude , and the formula is:
[0080] where N is the number of historical data samples, is the pressure amplitude of the nth sample, is the liquid production of the nth sample; S92. Correction Factor .
[0081] It should be noted that the calculation of the correction factor in the present invention is based on the correlation between historical liquid production data and pressure amplitude. By generating correction weights and combining with the pressure amplitude, the calculation results of the multi-parameter fusion model are adjusted. The introduction of the correction factor aims to compensate for the errors in the model calculation and make the liquid production calculation results closer to the actual production situation. The correction weights are obtained through statistical analysis of historical data and reflect the correlation between pressure amplitude and liquid production. In this way, the model can dynamically adjust the calculation results according to the actual operation data of the oil well, thereby improving the accuracy and reliability of liquid production prediction.
[0082] Specifically, the calculation of the correction factor involves two key steps: First, calculate the correction weights to quantify the relationship between pressure amplitude and liquid production in historical data. The correction weights are obtained by statistically analyzing the pressure amplitude and liquid production data of historical samples and reflect the linear or non-linear relationship between the two. Second, combine the correction weights with the current pressure amplitude to obtain the correction factor. The role of the correction factor is to adjust the output results of the multi-parameter fusion model to make it closer to the actual liquid production. In practical applications, the calculation of the correction weights requires collecting a sufficient number of historical data samples to ensure the reliability of the statistical results. For example, the liquid production and pressure amplitude data for the past year can be collected, and the correction weights can be obtained through correlation analysis or regression analysis. In addition, other influencing factors such as pump speed and fluid properties can also be considered in the calculation of the correction factor to further improve the correction effect.
[0083] Preferably, when calculating the correction weights, more complex statistical methods such as multiple linear regression or machine learning algorithms can be used to capture the complex relationship between pressure amplitude and liquid production. For example, by training a support vector machine (SVM) or neural network model to automatically learn the patterns in historical data, more accurate correction weights can be obtained.
[0084] Furthermore, the calculation of the correction factor can introduce a time decay factor to consider the weakening of the influence of historical data on the current liquid production over time. For example, smaller weights are assigned to earlier historical data, while larger weights are assigned to recent data. As an alternative, a dynamic feedback mechanism can also be introduced to dynamically adjust the correction factor according to the deviation between the real-time monitored liquid production and the model prediction value, thereby achieving adaptive liquid production prediction.
[0085] In some embodiments, the pump efficiency parameter is generated through the following steps: S101. Collect pump string displacement data in real time, and obtain the pump efficiency coefficient through displacement-load curve fitting ; S102. Update the dynamic compensation factor of the pump efficiency coefficient according to the non-linear relationship between the pump speed S and the liquid production , and the formula is:
[0086] where is the attenuation coefficient, k is the slope factor, is the pump speed critical value.
[0087] It should be noted that the generation of the pump efficiency parameter in the present invention is achieved by collecting pump string displacement data in real time, and combining displacement-load curve fitting and the non-linear relationship between pump speed and liquid production. The pump efficiency parameter is an important index reflecting the working efficiency of the pump string, and is used to characterize the effective liquid drainage capacity of the pump string during actual operation. By introducing the dynamic compensation factor, the pump efficiency coefficient can be further optimized to adapt to the pump speed changes under different working conditions. This method can provide more accurate pump efficiency parameter input for the multi-parameter fusion model, thereby improving the accuracy and reliability of oil well liquid production calculation.
[0088] Specifically, the generation of the pump efficiency coefficient includes two key steps: First, by collecting the displacement data of the pump string in real time and combining the load data to fit the displacement-load curve. The displacement-load curve reflects the load change situation of the pump string during movement and is the basis for calculating the pump efficiency coefficient. Second, according to the non-linear relationship between the pump speed and the liquid production, dynamically adjust the compensation factor of the pump efficiency coefficient. The pump speed refers to the number of reciprocating movements of the pump string per unit time and is one of the important factors affecting the pump efficiency. The introduction of the compensation factor can correct the deviation of the pump efficiency coefficient at different pump speeds, making it more accurately reflect the actual working efficiency of the pump string. In practical applications, the pump speed can be monitored in real time through sensors, the displacement-load curve can be obtained through data fitting, and the compensation factor is dynamically calculated according to the non-linear relationship between the pump speed and the liquid production.
[0089] Preferably, when generating the pump efficiency coefficient, high-precision displacement sensors and load sensors can be used to ensure the accuracy of the collected data. For example, the accuracy of the displacement sensor can reach the millimeter level, and the accuracy of the load sensor can reach the kilogram level. When fitting the displacement-load curve, polynomial fitting or non-linear regression methods can be used to better reflect the actual operating state of the pump column. For the dynamic adjustment of the compensation factor, appropriate attenuation coefficients and slope factors can be selected according to the actual working conditions. For example, for high-viscosity fluids or pump columns with large wear, the attenuation coefficient and slope factor can be appropriately adjusted to improve the compensation effect. As an alternative, machine learning algorithms can also be introduced to automatically optimize the generation process of the pump efficiency coefficient according to historical data. For example, by training a neural network model, the complex relationship between pump speed, displacement, load and liquid production can be automatically learned, so as to achieve more accurate generation of pump efficiency parameters.
[0090] The above embodiments of the present invention have the following beneficial effects: By collecting the real-time electric work diagram data of the motor and performing standardization processing, and combining the dynamic pressure fluctuation algorithm and the cycle segmentation algorithm, the present invention can accurately calculate the real-time pressure fluctuation value of the oil well pump column and effectively distinguish the effective cycle and the non-effective cycle of the pump column movement. This method can extract key pressure fluctuation characteristic parameters, such as the maximum pressure gradient, cycle duration and pressure amplitude, to provide high-precision input data for subsequent liquid production calculation. At the same time, the multi-parameter fusion model combined with the oil well pump efficiency parameters can further improve the accuracy and reliability of the liquid production calculation and meet the monitoring requirements under complex working conditions. In addition, the dynamic noise filtering algorithm and the adaptive baseline calibration algorithm can effectively remove the noise and baseline drift in the electric work diagram data and improve the data quality; the dynamic pressure fluctuation algorithm can convert the instantaneous load power into the real-time pressure fluctuation value, which can more accurately reflect the actual operating state of the oil well pump column. The extreme point detection and dynamic threshold judgment conditions in the cycle segmentation algorithm can adapt to the pressure fluctuation characteristics under different working conditions and ensure the accurate division of the effective cycle.
[0091] Meanwhile, the dynamic calculation formulas of the proportional coefficient and the integral coefficient can be adjusted according to the specific parameters of the oil well (such as fluid density, pump column cross-sectional area, etc.), which can enhance the adaptability and flexibility of the method. The sliding window update formula of the dynamic threshold judgment condition and the dynamic adjustment mechanism of the threshold coefficient can dynamically optimize the judgment condition according to real-time data, further improving the accuracy of cycle division. The calculation formulas of the maximum pressure gradient, cycle duration, and pressure amplitude can accurately extract the key characteristic parameters within the effective cycle, providing strong support for the calculation of liquid production. The introduction of the correction factor in the multi-parameter fusion model can dynamically adjust the calculation result according to the correlation between historical liquid production data and pressure amplitude, making it closer to the actual production situation. The dynamic generation and compensation mechanism of the pump efficiency parameter can reflect the operating efficiency of the pump column in real time, further optimizing the calculation accuracy of liquid production, and providing strong technical support for the refined management and optimized production of oil wells.
[0092] Furthermore, the storage medium of the embodiment of the present application stores program instructions that can implement all of the above methods. Among them, the program instructions can be stored in the above storage medium in the form of a software product, including several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs, or terminal devices such as computers, servers, mobile phones, and tablets.
[0093] The above description is only some preferred embodiments of the present invention and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present invention is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the technical solutions formed by mutually replacing the above features with (but not limited to) technical features with similar functions disclosed in the embodiments of the present invention.
Claims
1. A method for calculating the liquid production of an oil well from an electric work diagram, characterized in that Including the following steps: S1. Collect the real-time electric work diagram data of the motor, and the electric work diagram data includes current , voltage , power parameters and time series ; S2. Preprocess the electric work diagram data to generate standardized electric work diagram data; S3. Calculate the real-time pressure fluctuation value of the oil well pump string through the dynamic pressure fluctuation algorithm based on the standardized electric work diagram data ; S4. Based on the real-time pressure fluctuation value , the effective period and non-effective period of the pump string movement are divided by using a cycle segmentation algorithm; S5. Extract the pressure fluctuation characteristic parameters within the effective period, including the maximum pressure gradient , the cycle duration and the pressure amplitude ; S6. Input the pressure fluctuation characteristic parameters into the multi-parameter fusion model and combine with the oil well pump efficiency parameters , and output the calculation result of the liquid production volume of the oil well .
2. The method for calculating the liquid production of an oil well according to the electric work diagram described in claim 1, characterized in that, The preprocessing in S2 includes: S21. Execute a dynamic noise filtering algorithm on the electric work diagram data, and the filtering formula is: Among them, is the filtered current value, is the dynamic weight coefficient, N is the sliding window radius, is the original current value, and t is the time variable; S22. Execute an adaptive baseline calibration algorithm on the filtered electric work diagram data, and the calibration formula is: Among them, is the calibrated voltage value, is the filtered voltage value, and T is the calibration window length.
3. The method for calculating the liquid production of an oil well according to the electric work diagram described in claim 2, characterized in that, The dynamic pressure fluctuation algorithm in S3 includes: S31. Calculate the instantaneous load power of the pump string according to the power parameters in the standardized electric work diagram data , and the formula is: Among them, is the real-time power, is the filtered current value, and R is the equivalent resistance of the motor; S32. Convert the instantaneous load power into a real-time pressure fluctuation value , and the conversion formula is as follows: Among them, is the proportionality coefficient, is the integral coefficient, is the value of the instantaneous load power at time at that point.
4. The method for calculating the liquid production of an oil well according to the electric work diagram as claimed in claim 1, wherein The period segmentation algorithm in S4 includes: S41. Identify the maximum and minimum points of the real-time pressure fluctuation value through the extreme point detection algorithm ; S42. According to the time difference and pressure difference between adjacent maximum points and minimum points, determine whether the dynamic threshold judgment condition is satisfied: Among them, is the threshold coefficient, is the average value of pressure fluctuation, and are the times of adjacent extreme points, is the time at which the pressure fluctuation value is located, is the time at which the pressure fluctuation value is located; S43. If the conditions are met, then to the interval is marked as the valid period; otherwise, it is marked as the non-valid period.
5. The method for calculating the liquid production of an oil well according to the electric work diagram as claimed in claim 3, characterized in that, The proportionality coefficient in S32 and the integral coefficient are calculated by the following formula: Among them, and are calibration constants, is the fluid density, is the cross-sectional area of the pump column, is the length of the pump column, is the fluid viscosity, is the reference liquid production rate, is the pump diameter.
6. The method for calculating the liquid production of an oil well according to the electric work diagram as claimed in claim 4, wherein The dynamic threshold judgment condition in S42 further includes: S421. Calculate the sliding window update formula for the mean value of pressure fluctuation: Among them, is the number of data points within the window, is the attenuation factor, is the time point within the window; S422. Threshold Coefficient According to the pump speed Dynamically adjusted, the formula is: Among them, is the basic threshold value, is the adjustment range, is the attenuation rate.
7. The method for calculating the liquid production of an oil well according to the electric work diagram as claimed in claim 1, wherein The extraction of pressure fluctuation characteristic parameters in S5 includes: S51. Maximum pressure gradient The calculation formula is as follows: Among them, is the time point within the effective period, is the time at the pressure fluctuation value, is the time at the pressure fluctuation value; S52. Cycle duration It is the time difference between the maximum point and the minimum point within the effective cycle; S53. Pressure amplitude The calculation formula is as follows: 。 8. The method for calculating the liquid production of an oil well according to the electric work diagram as claimed in claim 1, wherein The multi-parameter fusion model in S6 is: Among them, is the liquid production rate, is the pump efficiency coefficient, is the liquid production rate calibration constant, is the reference liquid production rate, is the correction factor, is the pressure amplitude, is the cycle duration.
9. The method for calculating the liquid production of an oil well according to the electric work diagram as claimed in claim 8, wherein The correction factor is calculated as follows: Generate a correction weight based on the correlation between historical liquid production data and pressure amplitude , and the formula is: where N is the number of historical data samples, is the pressure amplitude of the nth sample, is the liquid production of the nth sample; S92. Correction factor .
10. The method for calculating the liquid production of an oil well according to the electric work diagram described in claim 1, characterized in that, The pump efficiency parameter is generated through the following steps: S101. Collect the displacement data of the pump string in real time, and obtain the pump efficiency coefficient through displacement-load curve fitting ; S102. Update the dynamic compensation factor of the pump efficiency coefficient according to the non-linear relationship between the pump speed S and the liquid production rate , and the formula is: wherein, is the attenuation coefficient, k is the slope factor, is the pump speed critical value.