A method and system for oil well load diagram prediction

By synchronously acquiring and slicing data, and combining accelerometer and barometer data to generate a reference displacement sequence, a predictive neural network is constructed. This solves the problem of oil well load dynamometer error caused by low-frequency acquisition by wireless dynamometers, and achieves high-precision oil well load dynamometer prediction.

CN121705672BActive Publication Date: 2026-04-28XINJIANG G C ENERGY TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XINJIANG G C ENERGY TECH
Filing Date
2026-02-24
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In existing technologies, wireless dynamometers use low-frequency data acquisition, which leads to a lack of motion cycle information and a significant increase in the error of oil well load dynamometer data.

Method used

By synchronously collecting initial electrical parameters, loads, accelerometer and barometer data of the oil well, performing data slicing and time synchronization, constructing a predictive neural network, and combining accelerometer and barometer data to generate a reference displacement sequence, obtain the dynamic stroke length, and construct an oil well load dynamometer diagram.

Benefits of technology

Ensure sensor data timestamp alignment to accurately capture oil pumping unit working units, improve displacement estimation accuracy, avoid cumulative errors caused by low-frequency acquisition, and ensure dynamometer accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121705672B_ABST
    Figure CN121705672B_ABST
Patent Text Reader

Abstract

The application provides an oil well load work graph prediction method and system, the method comprising: synchronously collecting initial electric parameter data set, load data set, accelerometer data set and barometer data set of the oil well, the initial electric parameter data set comprising active power data unit, and then obtaining active power data segment and load data segment; obtaining time lag amount based on the two, and then obtaining final electric parameter data segment; obtaining reference displacement sequence through the accelerometer data set and the barometer data set; obtaining dynamic stroke length based on the reference displacement sequence and the load data segment, and then obtaining final displacement sequence; constructing a prediction neural network, and obtaining the oil well load work graph based on the prediction neural network and real-time electric parameter data segment. The work graph is obtained by using continuous and high-frequency real-time electric parameter data segment, so that the motion cycle information loss caused by low-frequency data collection is avoided, and then the cumulative error is avoided, and the accuracy of the work graph is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data prediction technology, and in particular to a method and system for predicting oil well load dynamometer diagrams. Background Technology

[0002] Currently, digital oilfield construction has become an important part of the oil extraction process, typically employing measuring instruments such as RTUs (Remote Well Units) and wireless dynamometers for monitoring the status of oil wells. Specifically, the following equipment is installed on oil wells: RTUs: used for remotely detecting and controlling well startup, speed regulation, etc., and acting as a wireless gateway to receive and process data from surrounding wireless sensors; wireless power transmitters: used to monitor the power consumption of the pumping well; wireless pressure transmitters: used to monitor oil pressure in the well pipeline; wireless temperature transmitters: used to monitor oil temperature in the well pipeline; and wireless dynamometers: used to monitor the load and movement status of the pumping well.

[0003] In practical use, a typical instrumentation setup in the field is as follows: an RTU and a wireless power transmitter are installed in the wellhead distribution box, a wireless pressure / temperature transmitter is installed at the wellhead, and a wireless dynamometer is installed on the oil well. The wireless dynamometer uses low-power technologies such as Zigbee or LoRa and is powered by batteries.

[0004] However, in order to balance battery life and the requirements of the monitoring system, wireless dynamometers often use low-frequency data acquisition, such as forming a dynamometer chart at intervals of 30 to 60 minutes. However, if data acquisition is carried out at a high frequency, the area of ​​the dynamometer chart will be significantly different. That is, more motion cycle information will be missing in the low-frequency data acquisition, resulting in an uncorrectable cumulative error in the system, which in turn leads to a significant increase in the data error of the dynamometer chart for measuring oil. Summary of the Invention

[0005] To address the shortcomings of existing technologies, the present invention aims to provide a method and system for predicting oil well load dynamometer diagrams. This method and system solve the technical problem that existing wireless dynamometers use low-frequency data acquisition, resulting in a significant lack of motion cycle information, leading to uncorrectable cumulative errors in the system and consequently a substantial increase in the data error of dynamometer diagrams for oil measurement.

[0006] To achieve the above objectives, in a first aspect, embodiments of this application provide a method for predicting oil well load dynamometer diagrams, comprising the following steps:

[0007] S10: Synchronously acquire the initial electrical parameter dataset, load dataset, accelerometer dataset, and barometer dataset of the oil well. The initial electrical parameter dataset includes an active power data unit. The active power data unit and the load dataset are sliced ​​to obtain active power data segments and load data segments.

[0008] S20: Obtain the time lag based on the active power data segment and the load data segment, and obtain the final electrical parameter data segment that is time-synchronized with the load data segment based on the time lag.

[0009] S30: Obtain the accelerometer data segment and barometer data segment corresponding to the load data segment from the accelerometer dataset and the barometer dataset respectively, and obtain the reference displacement sequence based on the accelerometer data segment and the barometer data segment;

[0010] S40: Obtain the dynamic stroke length based on the reference displacement sequence and the load data segment, and obtain the final displacement sequence based on the dynamic stroke length;

[0011] S50: Using the final electrical parameter data segment as input value and the final displacement sequence and the load data segment as output value, construct a predictive neural network; based on the predictive neural network and the real-time electrical parameter data segment, obtain the real-time load data segment and the real-time displacement sequence; and construct an oil well load dynamometer based on the real-time load data segment and the real-time displacement sequence.

[0012] Furthermore, the step of slicing the active power data unit and the load dataset to obtain active power data segments and load data segments respectively includes:

[0013] Several minimum points are selected from the load dataset, and the acquisition time frame corresponding to the minimum point is obtained. The data points between two adjacent minimum points and the data points between two adjacent minimum points are combined into a load data segment.

[0014] Based on the acquisition time frame, several corresponding data points are selected from the active power data unit, and adjacent corresponding data points and the data points between adjacent corresponding data points are combined into an active power data segment.

[0015] Furthermore, the active power data segment includes active power signals under several time series, and the load data segment includes load signals under several time series. The step of obtaining the time lag based on the active power data segment and the load data segment includes:

[0016] A cross-correlation function is constructed based on the active power signal, the load signal, and the preset hysteresis.

[0017] The preset hysteresis that maximizes the value of the cross-correlation function is selected as the time hysteresis.

[0018] Furthermore, the formula for obtaining the cross-correlation function is:

[0019] ,

[0020] in, This represents the cross-correlation function corresponding to the preset hysteresis. Indicates the preset hysteresis. This represents the load signal in the t-th time frame. Indicates the first Active power signal in each time frame This indicates the total number of time frames in the payload data segment.

[0021] Furthermore, the accelerometer data segment includes acceleration signals over several time series, and the barometer data segment includes barometer pressure values ​​over several time series. The step of obtaining a reference displacement sequence based on the accelerometer data segment and the barometer data segment includes:

[0022] The acceleration signal is integrated twice to obtain the initial displacement sequence;

[0023] The maximum and minimum air pressure values ​​are obtained from the barometer data segment, and a mapped displacement sequence is obtained based on the maximum and minimum air pressure values.

[0024] The initial displacement sequence and the mapped displacement sequence are fused to obtain a reference displacement sequence.

[0025] Furthermore, the formula for obtaining the mapped displacement sequence is:

[0026] ,

[0027] in, This represents the mapped displacement sequence at time frame t. This represents the air pressure value in the t-th time frame. This indicates the minimum air pressure value. This indicates the maximum air pressure value. This indicates the preset stroke length.

[0028] Furthermore, the step of obtaining the dynamic stroke length based on the reference displacement sequence and the load data segment includes:

[0029] The reference displacement sequence is differentially processed to obtain a reference displacement differential sequence;

[0030] The dynamic net power is obtained through the load data segment and the reference displacement differential sequence;

[0031] The calibration stroke length is obtained based on the calibration displacement sequence, and the dynamic stroke length is obtained through the calibration stroke length, the calibration net power, and the dynamic net power.

[0032] Furthermore, the formula for obtaining the dynamic net work is:

[0033] ,

[0034] in, This represents the dynamic net power corresponding to the nth load data segment. This represents the load signal in the i-th time frame within the n-th load data segment. This represents the reference displacement difference sequence in the i-th time frame. This represents the total number of time frames in the nth payload data segment;

[0035] The formula for obtaining the dynamic stroke length is:

[0036] ,

[0037] in, This represents the dynamic stroke length corresponding to the nth load data segment. Indicates the calibrated stroke length. This indicates the net functional performance.

[0038] Furthermore, the step of obtaining the final displacement sequence based on the dynamic stroke length includes:

[0039] The calibration shift sequence is normalized to obtain a calibration shift morphology template;

[0040] The estimated displacement sequence is obtained based on the calibrated displacement pattern template and the dynamic stroke length.

[0041] The estimated displacement sequence is used as the initial value of the Kalman filter, and the dynamic stroke length is used as the constraint condition of the Kalman filter to iteratively update the estimated displacement sequence into the final displacement sequence.

[0042] Secondly, embodiments of this application provide an oil well load dynamometer prediction system, applied to the oil well load dynamometer prediction method as described in the first aspect above, the system comprising:

[0043] The first acquisition module is used to synchronously acquire the initial electrical parameter dataset, load dataset, accelerometer dataset, and barometer dataset of the oil well. The initial electrical parameter dataset includes an active power data unit. The active power data unit and the load dataset are sliced ​​to obtain active power data segments and load data segments.

[0044] The first calculation module is used to obtain the time lag based on the active power data segment and the load data segment, and to obtain the final electrical parameter data segment that is time-synchronized with the load data segment based on the time lag.

[0045] The second acquisition module is used to acquire the accelerometer data segment and the barometer data segment corresponding to the load data segment from the accelerometer dataset and the barometer dataset, respectively, and to acquire the reference displacement sequence based on the accelerometer data segment and the barometer data segment;

[0046] The second calculation module is used to obtain the dynamic stroke length based on the reference displacement sequence and the load data segment, and to obtain the final displacement sequence based on the dynamic stroke length.

[0047] The execution module is used to construct a predictive neural network by taking the final electrical parameter data segment as input value and the final displacement sequence and the load data segment as output value, to obtain the real-time load data segment and the real-time displacement sequence based on the predictive neural network and the real-time electrical parameter data segment, and to construct an oil well load dynamometer based on the real-time load data segment and the real-time displacement sequence.

[0048] Thirdly, embodiments of this application provide a computer, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the oil well load dynamometer prediction method as described in the first aspect above.

[0049] Fourthly, embodiments of this application provide a storage medium storing a computer program that, when executed by a processor, implements the oil well load dynamometer prediction method as described in the first aspect above.

[0050] Compared with the prior art, the beneficial effects of the present invention are as follows: By acquiring the initial electrical parameter dataset and the load dataset, performing data slicing and time synchronization respectively, the timestamps of all sensor data are strictly aligned, providing a reliable time reference for subsequent cross-modal data prediction and avoiding prediction errors caused by asynchronous acquisition. Using the minimum point (top dead center) of the load signal as the segmentation point, each data segment naturally corresponds to a complete "stroke cycle," accurately capturing the basic physical unit of the oil pumping unit's operation and laying the foundation for subsequent analysis in units of "cycles" (such as net power and stroke length acquisition); by providing the accelerometer data segments... The high-frequency dynamic details, combined with the absolute scale and low-frequency stability provided by the barometer data segment, result in a reference displacement sequence that is both morphologically accurate and numerically reliable. This provides high-precision label data for subsequent calculation of dynamic net work and calibration of the prediction model. By acquiring the dynamic stroke length, the system can automatically adapt to stroke length fluctuations caused by changes in underground fluid supply capacity and belt slippage, significantly improving the accuracy of displacement estimation. By constructing the prediction neural network, the system acquires the dynamometer diagram using continuous, high-frequency real-time electrical parameter data segments, avoiding the loss of motion cycle information caused by low-frequency data acquisition, thereby avoiding the generation of cumulative errors and ensuring the accuracy of the dynamometer diagram. Attached Figure Description

[0051] Figure 1 This is a flowchart of the oil well load dynamometer prediction method in the first embodiment of the present invention;

[0052] Figure 2 This is a structural block diagram of the oil well load dynamometer prediction system in the second embodiment of the present invention;

[0053] The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation

[0054] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.

[0055] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0057] Please see Figure 1 The first embodiment of the present invention provides a method for predicting oil well load dynamometer diagrams, comprising the following steps:

[0058] S10: Synchronously acquire the initial electrical parameter dataset, load dataset, accelerometer dataset, and barometer dataset of the oil well. The initial electrical parameter dataset includes an active power data unit. The active power data unit and the load dataset are sliced ​​to obtain active power data segments and load data segments.

[0059] Understandably, after the edge computing device (EAI-RTU) issues a data acquisition command, a precise hardware clock simultaneously triggers the electrical parameter acquisition module and the wireless dynamometer to acquire data, obtaining the initial electrical parameter dataset, the load dataset, the accelerometer dataset, and the barometer dataset. The initial electrical parameter dataset includes three-phase current data units, line voltage data units, active power data units, and power factor data units. It should be noted that the load dataset, the accelerometer dataset, and the barometer dataset are all acquired through the wireless dynamometer; therefore, the data points in the three datasets are completely synchronized within the time frame, requiring no subsequent time synchronization processing.

[0060] Step S10 includes:

[0061] S110: Select several minimum points in the load dataset, obtain the acquisition time frame corresponding to the minimum point, and combine two adjacent minimum points and the data points between two adjacent minimum points into a load data segment;

[0062] It should be noted that the basic working unit of oil well production is the "stroke cycle." To define this "stroke cycle," it is necessary to identify its key characteristic point. In this embodiment, the key characteristic point is the top dead center, which is the turning point where the polished rod ends its upward movement and begins its downward movement. It typically corresponds to the minimum load value. Understandably, the load dataset includes load signals from several time series. The minimum value point refers to the smallest load signal in a downward-upward cycle. Two adjacent minimum values ​​and the data points between them constitute the load data segment corresponding to one "stroke cycle." Understandably, the load data segment also includes load signals from several time series. Furthermore, since multiple "stroke cycles" exist within one sampling period, there are several load data segments corresponding to several "stroke cycles."

[0063] S120: Based on the acquisition time frame, select several corresponding data points from the active power data unit, and combine two adjacent corresponding data points and the data points between two adjacent corresponding data points into an active power data segment.

[0064] The active power data unit includes several active power signals under different time series. Understandably, since the initial electrical parameter dataset and the load dataset are acquired synchronously, the data points in the two datasets correspond to each other under different time series. After acquiring the acquisition time frame, the active power data segment can be obtained based on the acquisition time frame. Furthermore, the active power data segment also includes several active power signals under different time series, and there are several active power data segments corresponding to the load data segment.

[0065] S20: Obtain the time lag based on the active power data segment and the load data segment, and obtain the final electrical parameter data segment that is time-synchronized with the load data segment based on the time lag.

[0066] Because there is a physical delay in the conversion of electrical energy into mechanical energy, the initial electrical parameter dataset leads the load dataset. That is, although the data points in the initial electrical parameter dataset also exhibit periodic changes, their waveforms may be affected by various factors such as power grid fluctuations, motor performance, and transmission efficiency. Their extreme points are not exactly the same as the extreme points of mechanical motion, exhibiting an inherent delay. Therefore, the final electrical parameter data segment needs to be selected based on this time lag to ensure that the final electrical parameter data segment is time-synchronized with the load data segment, corresponding to the same "stroke cycle." Since the active power signal can comprehensively reflect the amplitude and phase of voltage and current, and has the strongest physical correlation with the load signal, the active power data segment is selected for comparison with the load data segment.

[0067] Specifically, step S20 includes:

[0068] S210: Construct a cross-correlation function based on the active power signal, the load signal, and the preset hysteresis;

[0069] The formula for obtaining the cross-correlation function is:

[0070] ,

[0071] in, This represents the cross-correlation function corresponding to the preset hysteresis. Indicates the preset hysteresis. This represents the payload signal in the t-th time frame, where t represents the time unit. Indicates the first Active power signal in each time frame This indicates the total number of time frames in the payload data segment. It should be noted that... It is an integer variable, based on prior physical knowledge (the delay in the conversion of electrical energy into mechanical energy is not infinite), therefore, it can be selectively set. The range of values ​​for is integers, such as integers between -10 and 10. This can be understood as... The value is less than This means it is less than the total number of time frames in the payload data segment. By limiting the upper and lower limits of the summation in the cross-correlation function, when calculating the cross-correlation of two finite-length sequences, only the overlapping portion where both signals are valid is summed, thereby avoiding array access out-of-bounds errors and ensuring the numerical stability and physical meaning of the calculation.

[0072] S220: Select the preset hysteresis that maximizes the value of the cross-correlation function as the time hysteresis.

[0073] In some embodiments, several preset hysteresis values ​​can be obtained through several active power data segments and several load data segments, and the time lag value can be obtained by averaging the several preset hysteresis values.

[0074] Understandably, after obtaining the time lag, an updated time frame is obtained by summing the acquisition time frame and the time lag. Based on the updated time frame, corresponding data points are selected from the three-phase current data unit, the line voltage data unit, the active power data unit, and the power factor data unit, respectively, to form the final three-phase current data segment, the final line voltage data segment, the final active power data segment, and the final power factor data segment. These are then combined into the final electrical parameter data segment. Understandably, there are several final electrical parameter data segments that correspond to several load data segments.

[0075] S30: Obtain the accelerometer data segment and barometer data segment corresponding to the load data segment from the accelerometer dataset and the barometer dataset respectively, and obtain the reference displacement sequence based on the accelerometer data segment and the barometer data segment;

[0076] Since the accelerometer dataset and the barometer dataset are time-synchronized with the load dataset, the accelerometer data segment and the barometer data segment can be obtained simply by using the first and last time frames of the load data segment.

[0077] Step S30 includes:

[0078] S310: Perform a second integration on the acceleration signal to obtain an initial displacement sequence;

[0079] The initial displacement sequence exhibits severe integral drift; it is correct in shape but distorted in scale and baseline.

[0080] S320: Obtain the maximum and minimum air pressure values ​​from the barometer data segment, and obtain a mapped displacement sequence based on the maximum and minimum air pressure values;

[0081] The formula for obtaining the mapped shift sequence is:

[0082] ,

[0083] in, This represents the mapped displacement sequence at time frame t. This represents the air pressure value in the t-th time frame. This indicates the minimum air pressure value. This indicates the maximum air pressure value. This indicates the preset stroke length.

[0084] Since the gas pressure inside the tubing and the height of the liquid column (i.e., the depth of the polished rod) have a definite relationship, the depth difference between the two can be obtained by acquiring the maximum gas pressure value and the minimum gas pressure value, and then the initial displacement sequence can be corrected.

[0085] S330: Perform data fusion on the initial displacement sequence and the mapped displacement sequence to obtain a reference displacement sequence;

[0086] Specifically, a first minimum displacement point, a first maximum displacement point, a second minimum displacement point, and a second maximum displacement point are obtained from the initial displacement sequence and the mapped displacement sequence, respectively. A transformation equation is constructed based on the first minimum displacement point, the second minimum displacement point, the first maximum displacement point, and the second maximum displacement point to obtain transformation parameters. The initial displacement sequence is updated to a transformed displacement sequence based on the transformation parameters. The reference displacement sequence is obtained based on the transformed displacement sequence and the mapped displacement sequence. The formula for obtaining the reference displacement sequence is as follows:

[0087] ,

[0088] in, This represents the reference displacement sequence at time frame t. This represents the transformed displacement sequence at time frame t. This represents the Kalman gain at time frame t. It should be noted that... According to The noise variance is dynamically obtained.

[0089] S40: Obtain the dynamic stroke length based on the reference displacement sequence and the load data segment, and obtain the final displacement sequence based on the dynamic stroke length;

[0090] Specifically, step S40 includes:

[0091] S410: Perform differential processing on the reference displacement sequence to obtain a reference displacement differential sequence;

[0092] S420: Obtain the dynamic net power through the load data segment and the reference displacement differential sequence;

[0093] The formula for obtaining the dynamic net work is:

[0094] ,

[0095] in, This represents the dynamic net power corresponding to the nth load data segment. This represents the load signal in the i-th time frame within the n-th load data segment. This represents the reference displacement difference sequence in the i-th time frame. This represents the total number of time frames in the nth payload data segment.

[0096] S430: Obtain the calibration stroke length based on the calibration displacement sequence, and obtain the dynamic stroke length through the calibration stroke length, calibration net power and dynamic net power;

[0097] Understandably, the calibration displacement sequence and the calibration net work are obtained in the same way as the reference displacement sequence and the dynamic net work, the only difference being that the data in the calibration displacement sequence and the calibration net work are acquired under stable operating conditions. It should be noted that after acquiring the calibration displacement sequence, the calibration stroke length is generated by the difference between the maximum and minimum values ​​of the calibration displacement sequence. The formula for obtaining the dynamic stroke length is:

[0098] ,

[0099] in, This represents the dynamic stroke length corresponding to the nth load data segment. Indicates the calibrated stroke length. This indicates the net functional performance.

[0100] S440: Normalize the marker shift sequence to obtain a marker shift morphology template;

[0101] The formula for obtaining the calibration displacement pattern template is:

[0102] ,

[0103] in, This represents the calibration displacement pattern template in the t-th time frame. This represents the calibration shift sequence in the t-th time frame. This indicates taking the minimum value. This indicates taking the maximum value.

[0104] S450: Obtain the estimated displacement sequence based on the calibrated displacement pattern template and the dynamic stroke length;

[0105] The predicted displacement sequence is obtained by multiplying the calibrated displacement pattern template by the dynamic stroke length.

[0106] S460: Using the initial value of the estimated displacement sequence as the initial state value of the Kalman filter, and using the dynamic stroke length as the constraint condition of the Kalman filter, the estimated displacement sequence is iteratively updated to the final displacement sequence.

[0107] Understandably, the initial values ​​of the estimated displacement sequence are used as the initial position vector, and the initial velocity vector is obtained based on the first 'a' values ​​of the estimated displacement sequence. In this embodiment, 'a' is 2, meaning the difference between the first two values ​​is divided by the difference between time frames to obtain the initial velocity vector. An initial state vector is constructed based on the initial position vector and the initial velocity vector, and an initial error covariance matrix is ​​also constructed. The initial state vector and the initial error covariance matrix are input into a Kalman filter to predict the stage state vector and stage error covariance matrix for the next time step. The accelerometer data segment and the barometer data segment are used as observation vectors. Based on the observation vectors, the stage state vector and the stage error covariance matrix are converted into an updated state vector and an updated error covariance matrix. The initial position vector of the initial state vector and the updated position vector from all the updated state vectors are extracted to form the final displacement sequence. Kalman filtering data fusion is widely used and will not be elaborated upon here.

[0108] S50: Using the final electrical parameter data segment as input value and the final displacement sequence and the load data segment as output value, construct a prediction neural network; obtain real-time load data segment and real-time displacement sequence based on the prediction neural network and the real-time electrical parameter data segment; construct an oil well load dynamometer based on the real-time load data segment and the real-time displacement sequence.

[0109] In this embodiment, the predictive neural network includes an input layer (for receiving real-time electrical parameter data segments, assumed to be 200 time frames * 8 electrical parameter units), an encoder, and a decoder. The encoder includes a first convolutional layer (64 5*1 filters, outputting a 200*8*64 data matrix), a first pooling layer (2*1 max pooling, outputting a 100*8*64 data matrix), a second convolutional layer (128 3*1 filters, outputting a 100*8*128 data matrix), and a second pooling layer (2*1 max pooling). The decoder comprises a flattening layer (flattening the 25*8*256 data matrix into a 51200-dimensional vector), a fully connected layer (reducing the 51200-dimensional vector to a 400-dimensional vector), and a reshaping layer (outputting a 200*2 matrix, corresponding to the real-time load data segment and the real-time displacement sequence, respectively). In this embodiment, the predictive neural network uses mean squared error combined with physical constraints (such as displacement) as the loss function.

[0110] By acquiring the initial electrical parameter dataset and the load dataset, data slices were performed and time synchronization was established to ensure strict alignment of timestamps for all sensor data. This provided a reliable time reference for subsequent cross-modal data prediction, avoiding prediction errors caused by asynchronous acquisition. Using the minimum point (top dead center) of the load signal as the segmentation point ensured that each data segment naturally corresponded to a complete "stroke cycle." This not only accurately captured the basic physical unit of the oil pumping unit's operation but also laid the foundation for subsequent analysis based on "cycles" (such as net power and stroke length acquisition). Furthermore, by integrating the high-frequency dynamic details provided by the accelerometer data segments with the... The combination of absolute scale and low-frequency stability provided by the barometer data segment results in a reference displacement sequence that is both morphologically accurate and numerically reliable. This provides high-precision label data for subsequent calculation of dynamic net work and calibration of the prediction model. By acquiring the dynamic stroke length, the system can automatically adapt to stroke length fluctuations caused by changes in underground fluid supply capacity and belt slippage, significantly improving the accuracy of displacement estimation. By constructing the prediction neural network and acquiring the dynamometer diagram using continuous, high-frequency real-time electrical parameter data segments, the system avoids the loss of motion cycle information caused by low-frequency data acquisition, thereby avoiding the generation of cumulative errors and ensuring the accuracy of the dynamometer diagram.

[0111] Please see Figure 2 The second embodiment of the present invention provides an oil well load dynamometer prediction system. This system is applied to the oil well load dynamometer prediction method described in the above embodiments, and will not be repeated hereafter. As used below, the terms "module," "unit," "subunit," etc., can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0112] The system includes:

[0113] The first acquisition module 10 is used to synchronously acquire the initial electrical parameter dataset, load dataset, accelerometer dataset and barometer dataset of the oil well. The initial electrical parameter dataset includes an active power data unit. The active power data unit and the load dataset are sliced ​​to obtain active power data segments and load data segments.

[0114] The first acquisition module 10 includes:

[0115] The first unit is used to select several minimum points in the load dataset, obtain the acquisition time frame corresponding to the minimum point, and combine two adjacent minimum points and the data points between two adjacent minimum points into a load data segment.

[0116] The second unit is used to select several corresponding data points from the active power data unit based on the acquisition time frame, and combine two adjacent corresponding data points and the data points between two adjacent corresponding data points into an active power data segment.

[0117] The first calculation module 20 is used to obtain a time lag based on the active power data segment and the load data segment, and to obtain a final electrical parameter data segment that is time-synchronized with the load data segment based on the time lag.

[0118] The first computing module 20 includes:

[0119] The third unit is used to construct a cross-correlation function based on the active power signal, the load signal, and the preset hysteresis.

[0120] The fourth unit is used to select the preset hysteresis that maximizes the value of the cross-correlation function as the time lag.

[0121] The second acquisition module 30 is used to acquire the accelerometer data segment and the barometer data segment corresponding to the load data segment from the accelerometer dataset and the barometer dataset, respectively, and to acquire the reference displacement sequence based on the accelerometer data segment and the barometer data segment.

[0122] The second acquisition module 30 includes:

[0123] The fifth unit is used to perform a second integration on the acceleration signal to obtain an initial displacement sequence;

[0124] The sixth unit is used to obtain the maximum and minimum air pressure values ​​from the barometer data segment, and to obtain a mapped displacement sequence based on the maximum and minimum air pressure values;

[0125] The seventh unit is used to perform data fusion on the initial displacement sequence and the mapped displacement sequence to obtain a reference displacement sequence;

[0126] The second calculation module 40 is used to obtain the dynamic stroke length based on the reference displacement sequence and the load data segment, and to obtain the final displacement sequence based on the dynamic stroke length.

[0127] The second calculation module 40 includes:

[0128] The eighth unit is used to perform differential processing on the reference displacement sequence to obtain a reference displacement differential sequence;

[0129] The ninth unit is used to obtain the dynamic net power through the load data segment and the reference displacement differential sequence;

[0130] The tenth unit is used to obtain the calibration stroke length based on the calibration displacement sequence, and to obtain the dynamic stroke length through the calibration stroke length, the calibration net power and the dynamic net power;

[0131] The eleventh unit is used to normalize the calibration shift sequence to obtain a calibration shift morphology template.

[0132] The twelfth unit is used to obtain the estimated displacement sequence based on the calibrated displacement pattern template and the dynamic stroke length;

[0133] The thirteenth unit is used to use the initial value of the estimated displacement sequence as the initial state value of the Kalman filter and the dynamic stroke length as the constraint condition of the Kalman filter to iteratively update the estimated displacement sequence into the final displacement sequence.

[0134] The execution module 50 is used to construct a predictive neural network by taking the final electrical parameter data segment as input value and the final displacement sequence and the load data segment as output value, to obtain a real-time load data segment and a real-time displacement sequence based on the predictive neural network and the real-time electrical parameter data segment, and to construct an oil well load dynamometer based on the real-time load data segment and the real-time displacement sequence.

[0135] The present invention also provides a computer, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the oil well load dynamometer prediction method as described in the above technical solutions.

[0136] The present invention also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the oil well load dynamometer prediction method as described in the above technical solution.

[0137] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0138] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A method for predicting oil well load dynamometer diagrams, characterized in that, Includes the following steps: S10: Synchronously acquire the initial electrical parameter dataset, load dataset, accelerometer dataset, and barometer dataset of the oil well. The initial electrical parameter dataset includes an active power data unit. The active power data unit and the load dataset are sliced ​​to obtain active power data segments and load data segments. S20: Obtain the time lag based on the active power data segment and the load data segment, and obtain the final electrical parameter data segment that is time-synchronized with the load data segment based on the time lag. S30: Obtain the accelerometer data segment and barometer data segment corresponding to the load data segment from the accelerometer dataset and the barometer dataset respectively, and obtain the reference displacement sequence based on the accelerometer data segment and the barometer data segment; S40: Obtain the dynamic stroke length based on the reference displacement sequence and the load data segment, and obtain the final displacement sequence based on the dynamic stroke length; S50: Using the final electrical parameter data segment as input value and the final displacement sequence and the load data segment as output value, construct a predictive neural network; based on the predictive neural network and the real-time electrical parameter data segment, obtain the real-time load data segment and the real-time displacement sequence; and construct an oil well load dynamometer based on the real-time load data segment and the real-time displacement sequence.

2. The oil well load dynamometer prediction method according to claim 1, characterized in that, The step of slicing the active power data unit and the load dataset to obtain active power data segments and load data segments respectively includes: Several minimum points are selected from the load dataset, and the acquisition time frame corresponding to the minimum point is obtained. The data points between two adjacent minimum points and the data points between two adjacent minimum points are combined into a load data segment. Based on the acquisition time frame, several corresponding data points are selected from the active power data unit, and adjacent corresponding data points and the data points between adjacent corresponding data points are combined into an active power data segment.

3. The oil well load dynamometer prediction method according to claim 1, characterized in that, The active power data segment includes active power signals under several time series, and the load data segment includes load signals under several time series. The step of obtaining the time lag based on the active power data segment and the load data segment includes: A cross-correlation function is constructed based on the active power signal, the load signal, and the preset hysteresis. The preset hysteresis that maximizes the value of the cross-correlation function is selected as the time hysteresis.

4. The oil well load dynamometer prediction method according to claim 3, characterized in that, The formula for obtaining the cross-correlation function is: , in, This represents the cross-correlation function corresponding to the preset hysteresis. Indicates the preset hysteresis. This represents the load signal in the t-th time frame. Indicates the first Active power signal in each time frame This indicates the total number of time frames in the payload data segment.

5. The oil well load dynamometer prediction method according to claim 1, characterized in that, The accelerometer data segment includes acceleration signals over several time series, and the barometer data segment includes barometer pressure values ​​over several time series. The step of obtaining a reference displacement sequence based on the accelerometer data segment and the barometer data segment includes: The acceleration signal is integrated twice to obtain the initial displacement sequence; The maximum and minimum air pressure values ​​are obtained from the barometer data segment, and a mapped displacement sequence is obtained based on the maximum and minimum air pressure values. The initial displacement sequence and the mapped displacement sequence are fused to obtain a reference displacement sequence.

6. The oil well load dynamometer prediction method according to claim 5, characterized in that, The formula for obtaining the mapped shift sequence is: , in, This represents the mapped displacement sequence at time frame t. This represents the air pressure value in the t-th time frame. This indicates the minimum air pressure value. This indicates the maximum air pressure value. This indicates the preset stroke length.

7. The oil well load dynamometer prediction method according to claim 1, characterized in that, The step of obtaining the dynamic stroke length based on the reference displacement sequence and the load data segment includes: The reference displacement sequence is differentially processed to obtain a reference displacement differential sequence; The dynamic net power is obtained through the load data segment and the reference displacement differential sequence; The calibration stroke length is obtained based on the calibration displacement sequence, and the dynamic stroke length is obtained through the calibration stroke length, the calibration net power, and the dynamic net power.

8. The oil well load dynamometer prediction method according to claim 7, characterized in that, The formula for obtaining the dynamic net work is: , in, This represents the dynamic net power corresponding to the nth load data segment. This represents the load signal in the i-th time frame within the n-th load data segment. This represents the reference displacement difference sequence in the i-th time frame. This represents the total number of time frames in the nth payload data segment; The formula for obtaining the dynamic stroke length is: , in, This represents the dynamic stroke length corresponding to the nth load data segment. Indicates the calibrated stroke length. This indicates the net functional performance.

9. The oil well load dynamometer prediction method according to claim 7, characterized in that, The step of obtaining the final displacement sequence based on the dynamic stroke length includes: The calibration shift sequence is normalized to obtain a calibration shift morphology template; The estimated displacement sequence is obtained based on the calibrated displacement pattern template and the dynamic stroke length. The estimated displacement sequence is used as the initial value of the Kalman filter, and the dynamic stroke length is used as the constraint condition of the Kalman filter to iteratively update the estimated displacement sequence into the final displacement sequence.

10. An oil well load dynamometer prediction system, applied to the oil well load dynamometer prediction method as described in any one of claims 1 to 9, characterized in that, The system includes: The first acquisition module is used to synchronously acquire the initial electrical parameter dataset, load dataset, accelerometer dataset, and barometer dataset of the oil well. The initial electrical parameter dataset includes an active power data unit. The active power data unit and the load dataset are sliced ​​to obtain active power data segments and load data segments. The first calculation module is used to obtain the time lag based on the active power data segment and the load data segment, and to obtain the final electrical parameter data segment that is time-synchronized with the load data segment based on the time lag. The second acquisition module is used to acquire the accelerometer data segment and the barometer data segment corresponding to the load data segment from the accelerometer dataset and the barometer dataset, respectively, and to acquire the reference displacement sequence based on the accelerometer data segment and the barometer data segment; The second calculation module is used to obtain the dynamic stroke length based on the reference displacement sequence and the load data segment, and to obtain the final displacement sequence based on the dynamic stroke length. The execution module is used to construct a predictive neural network by taking the final electrical parameter data segment as input value and the final displacement sequence and the load data segment as output value, to obtain the real-time load data segment and the real-time displacement sequence based on the predictive neural network and the real-time electrical parameter data segment, and to construct an oil well load dynamometer based on the real-time load data segment and the real-time displacement sequence.

Citation Information

Patent Citations

  • Device and method for measuring indicator diagram by electric parameters

    CN105952439A

  • Method for inverting ground power diagram from electric power diagram of oil pumping unit

    CN110439537A