Oil well pump underground indicator diagram inflection point identification method, device and equipment and medium
By preprocessing and calculating the derivative of the underground dynamometer card of the oil pump, and combining the curvature change rate and load change to screen target points, the error problem of the five-point curvature approximation method in inflection point identification was solved, achieving higher accuracy and real-time inflection point identification, and improving the optimization effect of oil well production.
Patent Information
- Application Number
- CN202510930599.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-07
- Publication Date
- 2025-11-14
Smart Images

Figure CN120950858A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of oilfield production technology, and more specifically, to a method, apparatus, equipment, and medium for identifying inflection points on underground dynamometer diagrams of oil pumps. Background Technology
[0002] The dynamometer card (DDC) of a pumping unit well, as a crucial image reflecting the operating status of the pump, displays the mechanical motion and fluid flow characteristics of the pump by collecting suspension point load and displacement data. It is widely used in oilfield production for pump efficiency evaluation, fault diagnosis, and accurate production calculation. Inflection points on the DDC curve (such as the upper dead center and lower dead center) precisely correspond to key nodes in the pump's suction and discharge process, serving as the core basis for judging the pump's operating status and calculating the effective stroke. The accuracy of inflection point identification directly affects the diagnostic accuracy of faults such as gas lock, pump sticking, and rod breakage, thus impacting well production prediction and production optimization. Therefore, improving the accuracy of inflection point positioning on the DDC has significant engineering implications and application value.
[0003] Currently, the common production method uses the "five-point curvature approximation method" to identify inflection points. This method analyzes the coordinates of five consecutive discrete points on the indicator diagram, such as (i−2, i−1, i, i+1, i+2), and calculates the approximate curvature value of the intermediate point to determine the location of the inflection point. However, the five-point curvature approximation method has several technical drawbacks: First, it relies solely on five local data points, and in nonlinear deformation scenarios such as elastic vibration of the pole, the curvature calculation deviates from the actual situation due to nonlinear deformation of the dynamometer card. Second, this method is sensitive to the sampling interval; when the data sampling is uneven or the resolution is insufficient, the approximation error of the angle and arc length is amplified, leading to deviation in the inflection point location and making it prone to misjudgment and missed judgment. Third, this method relies on data from two points before and after the inflection point, resulting in a dynamic response lag when the inflection point undergoes rapid abrupt changes. Furthermore, the five-point method relies on a three-point circular arc approximation, and when faced with high-frequency noise in the dynamometer card (such as sensor jitter and pole vibration), the curvature calculation error becomes significant. Finally, the five-point method requires manual judgment based on experience to address the multiple solutions to curvature abrupt changes, making it difficult to achieve fully automatic and efficient recognition. Summary of the Invention
[0004] The present invention aims to solve at least one of the above-mentioned technical problems.
[0005] To address the aforementioned problems, this invention provides a method, apparatus, equipment, and medium for identifying inflection points on underground dynamometer diagrams of oil pumps.
[0006] In a first aspect, the present invention provides a method for identifying inflection points on underground dynamometer charts of oil pumps, comprising: The initial curve data of the pre-acquired underground dynamometer diagram is preprocessed to obtain curve data; Determine the first and second derivatives of the curve data with respect to time; The rate of change of curvature is obtained based on the first derivative and the second derivative; The stroke is divided according to the curve data to obtain the upstroke and the downstroke. Multiple target points in the upstroke and the downstroke are obtained according to a preset interval number of points. The target points are then filtered according to the curvature change rate and the load change to obtain the upstroke inflection point and the downstroke inflection point.
[0007] Optionally, the curve data includes displacement curves, load curves, and travel distances; the preprocessing of the initial curve data from the pre-acquired underground dynamometer diagram to obtain the curve data includes: The initial curve data is filtered using a five-point average filtering method to obtain a smooth curve. The smooth curve is normalized to obtain the displacement curve and the load curve; The distance traveled is obtained from the displacement curve.
[0008] Optionally, determining the first and second derivatives of the curve data with respect to time includes: Determine the first and second derivatives of the displacement curve with respect to time; Determine the first and second derivatives of the load curve with respect to time.
[0009] Optionally, obtaining the rate of change of curvature based on the first derivative and the second derivative includes: Using the moving distance as a geometric scale reference, the curvature is obtained based on the first derivative of the displacement, the second derivative of the displacement, the first derivative of the load, and the second derivative of the load using the curvature calculation equation; Obtain the first derivative of the curvature with respect to time to get the initial rate of change; The initial rate of change is preprocessed to obtain the rate of change of curvature.
[0010] Optionally, multiple target points in the upstroke and downstroke are obtained at preset intervals, and the target points are filtered according to the rate of curvature change and the load change to obtain the upstroke inflection point and the downstroke inflection point, including: The average load value is obtained based on the load curve. The load curve is divided according to the average load value, wherein the portion of the load curve in which the load is less than or equal to the average load value is divided into the downstroke, and the portion of the load curve in which the load is greater than the average load value is divided into the upstroke. Based on the initial point, each point in the upstroke and downstroke is divided and filtered according to the preset interval number to obtain multiple upper target points and multiple lower target points; The first upper inflection point is obtained by obtaining the point with the largest rate of curvature change among the upper target points. The first difference between the average load change of the other points (excluding the first upper inflection point) and the average load change of the other points is obtained by obtaining the first difference between the average load change of the other points (excluding the first upper inflection point). The point corresponding to the largest first difference is selected to obtain the second upper inflection point. The upper stroke inflection point is obtained based on the first upper inflection point and the second upper inflection point. The first lower inflection point is obtained by finding the point with the largest rate of curvature change among the lower target points. The second difference between the average load change of a preset number of points before and the average load change of a preset number of points after the other lower target points (excluding the first lower inflection point) is obtained. The point corresponding to the largest second difference is selected to obtain the second lower inflection point. The lower stroke inflection point is obtained based on the first lower inflection point and the second lower inflection point.
[0011] Optionally, obtaining the travel distance based on the displacement curve includes: Using the initial displacement as a reference, the sum of the absolute values of the differences between every two adjacent points in the displacement curve is obtained to obtain the movement distance.
[0012] Optionally, the method for identifying inflection points on the underground dynamometer card of the oil pump further includes: The inverse normalization process is performed on the inflection point of the upstroke and the inflection point of the downstroke respectively to obtain the true coordinate values of the inflection point of the upstroke and the inflection point of the downstroke.
[0013] Secondly, the present invention provides a device for identifying inflection points on underground dynamometer charts of oil pumps, comprising: The preprocessing module is used to preprocess the initial curve data of the pre-acquired underground dynamometer diagram to obtain curve data; The first calculation module is used to determine the first and second derivatives of the curve data with respect to time; The second calculation module is used to obtain the rate of change of curvature based on the first derivative and the second derivative; The search module is used to divide the stroke according to the curve data to obtain the top stroke and the bottom stroke, obtain multiple target points in the top stroke and the bottom stroke according to a preset interval number of points, and filter the target points according to the curvature change rate and load change to obtain the top stroke inflection point and the bottom stroke inflection point.
[0014] Thirdly, the present invention provides an electronic device, including a memory and a processor; The memory is used to store computer programs; The processor is configured to, when executing the computer program, implement the method for identifying inflection points on underground indicator diagrams of oil pumps as described in the first aspect.
[0015] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method for identifying inflection points on underground indicator diagrams of oil pumps as described in the first aspect.
[0016] The beneficial effects of the method, apparatus, equipment, and medium for identifying inflection points on underground dynamometer diagrams of oil pumps of the present invention are as follows: Preprocessing the initial curve data of the pre-acquired underground dynamometer diagram improves the clarity of the curve data representation, providing a data foundation for subsequent curvature change rate calculations. Determining the first and second derivatives of the curve data with respect to time, and based on the definition of the derivative of a continuous function, accurately calculates, for example, the rate of change and acceleration of displacement and load, reducing the local fitting deviation problem existing in related technologies, providing core parameters for curvature change rate calculation, and thus improving the accuracy of curvature change rate calculation. Obtaining the curvature change rate based on the first and second derivatives does not depend on preceding and following points, and can calculate the curvature change rate on real-time generated curve data, responding in real-time to curvature abrupt changes (such as sudden load changes), effectively solving the dynamic response lag problem existing in the five-point curvature approximation method in related technologies. The stroke is divided into upstroke and downstroke based on the curve data. Multiple target points in the upstroke and downstroke are obtained at preset intervals. The target points are then filtered based on the rate of curvature change and the load change to obtain the upstroke inflection point and the downstroke inflection point. The peak value of the rate of curvature change and the load change are used as dual criteria for inflection points, replacing the traditional curvature value. This improves the sensitivity to instantaneous changes, results in a faster dynamic response, and can capture inflection points that are lagging behind traditional methods, effectively improving the real-time performance and accuracy of inflection point capture. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the method for identifying inflection points in underground dynamometer diagrams of oil pumps according to an embodiment of the present invention. Figure 2 A schematic diagram of the ground distance load curve and the corresponding underground distance load curve; Figure 3 The above-ground and underground dynamometer diagrams for the oil pumping unit; Figure 4 This is an initial rate of change-distance curve diagram of an embodiment of the present invention; Figure 5 The curves showing the rate of change of curvature versus distance and the inflection point diagrams are from embodiments of the present invention. Figure 6 This is a schematic diagram of the structure of the inflection point identification device for the underground dynamometer card of an oil pump according to an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention; Figure 8 This is a curvature-distance curve diagram of an embodiment of the present invention. Detailed Implementation
[0018] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the accompanying drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0019] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0020] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to"; the term "based on" means "at least partially based on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments"; and the term "optionally" means "optional embodiments". Definitions of other terms will be given in the following description. It should be noted that the concepts of "first," "second," etc., mentioned in this invention are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0021] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0022] The names of the messages or information exchanged between the multiple devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0023] like Figure 1 As shown in the figure, an embodiment of the present invention provides a method for identifying inflection points on underground indicator diagrams of oil pumps, comprising: Step S1: Preprocess the initial curve data of the pre-acquired underground dynamometer diagram to obtain curve data.
[0024] Specifically, the underground dynamometer card is obtained by inversion calculation using the surface dynamometer card (the load-displacement curve of the sucker rod measured at the wellhead) combined with the wave equation (a mathematical model considering the elastic vibration of the sucker rod string and the hydrodynamic characteristics of the wellbore). It is a graphical representation of the load-displacement relationship at the sucker pump plunger (downhole pump end), such as... Figure 2 As shown, after obtaining the initial curve data of the underground dynamometer card, the initial curve data needs to be preprocessed, such as necessary normalization, outlier detection to improve the quality represented by the curve, resampling, etc., to obtain the processed curve data, which provides the calculation basis for the first derivative, second derivative and curvature change rate calculation in the subsequent step S2 and step S3.
[0025] It should be noted that, as Figure 3 As shown, this is an underground dynamometer diagram directly obtained from the surface dynamometer diagram. To ensure consistency in the representation of subsequent underground dynamometer diagrams, it is based on... Figure 3 The underground dynamometer diagram converts the horizontal axis into the distance traveled, thus obtaining... Figure 2 .
[0026] Step S2: Determine the first and second derivatives of the curve data with respect to time.
[0027] Specifically, the first and second derivatives with respect to time are calculated for the preprocessed curve data. The curve data typically includes load curves and displacement curves. The first and second derivatives with respect to time for each coordinate point in the load curve and displacement curve need to be calculated separately. The first derivative reflects the rate of change of displacement and load, such as velocity and load change rate, respectively. The second derivative reflects acceleration and the acceleration of load change, respectively, and is the core input for curvature calculation.
[0028] Step S3: Obtain the rate of change of curvature based on the first derivative and the second derivative.
[0029] Specifically, curvature can be obtained using the curvature calculation formula, and then the rate of change of curvature can be obtained based on the relationship between curvature and time, such as... Figure 5 As shown. Based on the rate of change of curvature, curvature abrupt change points can be identified. Compared with the curvature value, the rate of change of curvature is more sensitive to inflection points (such as curvature jumps caused by sudden load changes) and can more clearly indicate inflection point changes.
[0030] Step S4: Divide the stroke according to the curve data to obtain the upstroke and downstroke. Obtain multiple target points in the upstroke and downstroke according to a preset interval number of points. Filter the target points according to the curvature change rate and load change to obtain the upstroke inflection point and downstroke inflection point.
[0031] Specifically, the stroke stages are first divided based on the curve data. It's important to note that, according to the working principle of the pumping unit, the upstroke load is primarily the sum of the rod and liquid column weights, while the downstroke load is only the rod weight. Therefore, the stroke stages can be divided using a preset standard load division (e.g., the median in the load curve), resulting in the upstroke and downstroke stages. This provides a prerequisite for subsequent stage-by-stage inflection point finding. Multiple target points are obtained for each stroke at preset intervals. The rate of curvature change is used as the primary indicator, and the load change is used as the secondary indicator to filter the target points, ultimately yielding highly accurate upstroke and downstroke inflection points. Figure 5 As shown, points a and b are the inflection points of the upstroke, and points c and d are the inflection points of the downstroke. It should be noted that the inflection points of the upstroke and downstroke include the start and end points, respectively, and can be used to calculate the stroke distance, for example, S_upstroke = S_endpoint - S_startpoint, and then to calculate the effective volume of the pump, and thus to estimate the oil well production.
[0032] In this embodiment, the initial curve data of the pre-acquired underground dynamometer map is preprocessed to improve the clarity of the curve data representation and provide a data foundation for the subsequent curvature change rate. The first and second derivatives of the curve data with respect to time are determined. Based on the definition of the derivative of a continuous function, the rates of change and acceleration of, for example, displacement and load are accurately calculated, reducing the local fitting bias problem existing in related technologies. This provides core parameters for the calculation of the curvature change rate, thereby improving the accuracy of the curvature change rate calculation. The curvature change rate is obtained based on the first and second derivatives, without relying on previous and subsequent points. It can be used to calculate the curvature change rate of real-time generated curve data, responding in real-time to curvature abrupt changes (such as sudden load changes), effectively solving the dynamic response lag problem existing in the five-point curvature approximation method in related technologies. The stroke is divided based on the curve data to obtain the upstroke and downstroke. Multiple target points in the upstroke and downstroke are obtained at preset intervals. The curvature change rate is used as the first indicator and the load change is used as the second indicator to filter the target points, thereby obtaining the upstroke inflection point and the downstroke inflection point. The peak value of the curvature change rate and the load change are used as the dual criteria for inflection points, replacing the traditional curvature value. This improves the sensitivity to instantaneous changes, results in a faster dynamic response, and can capture inflection points that are lagging behind traditional methods, effectively improving the real-time performance and accuracy of inflection point capture.
[0033] Optionally, the curve data includes displacement curves, load curves, and travel distances; the preprocessing of the initial curve data from the pre-acquired underground dynamometer diagram to obtain the curve data includes: The initial curve data is filtered using a five-point average filtering method to obtain a smooth curve.
[0034] Specifically, the preprocessing of the initial curve data includes filtering and normalization. First, a five-point average filtering method is used to filter the initial curve data, that is, to obtain the average value of each coordinate point in the initial curve data, expressed as: , , Where, x i This represents the x-coordinate of the i-th point in the initial curve data, i.e., the displacement coordinate. i-2 This represents the displacement coordinate of the (i-2)th point in the initial curve data, x i-1 This represents the displacement coordinate of the (i-1)th point in the initial curve data, x i+1 This represents the displacement coordinate of the (i+1)th point in the initial curve data, x. i+2 This represents the displacement coordinate of the (i+2)th point in the initial curve data; y i This represents the ordinate of the i-th point in the initial curve data, i.e., the load coordinate. i-2 This represents the load coordinates of the (i-2)th point in the initial curve data, y i-1 This represents the load coordinates of the (i-1)th point in the initial curve data, y i+1 This represents the load coordinates of the (i+1)th point in the initial curve data, y i+2 This represents the load coordinates of the (i+2)th point in the initial curve data; i This represents the average displacement coordinate of the i-th point in the initial curve data. i This represents the average load coordinate of the i-th coordinate point in the initial curve data.
[0035] It can effectively suppress high-frequency noise (such as sensor jitter and rod vibration), avoid noise from causing distortion in subsequent curvature calculations, and perform local smoothing on discrete data. This reduces the interference of adjacent point fluctuations on curvature approximation in the "five-point curvature method", reduces local fitting deviation, and thus improves the accuracy of inflection point identification.
[0036] The smooth curve is normalized to obtain the displacement curve and the load curve.
[0037] Specifically, the displacement in the filtered smooth curve i and load i Normalize them to the range [−1, 1] to obtain displacement curves and load curves, eliminating the dimensional differences between displacement and load (e.g., displacement is in meters and load is in Newtons), so that they can participate in the calculation on the same scale, which facilitates the numerical stability of the derivative in the subsequent curvature formula and avoids calculation deviations caused by dimensional differences.
[0038] For example, the displacement in a smooth curve is { 1, 2, ..., n}, its minimum value is min The maximum value is max Then the normalized displacement value X norm,i for: X norm,i = -1, The displacement curve consists of all X norm,i Arranged in chronological order, the load curves reflect the relative trend of displacement change. The method for obtaining the load curves is the same as that for the displacement curves, and will not be repeated here.
[0039] The distance traveled is obtained from the displacement curve, including: Using the initial displacement as a reference, the sum of the absolute values of the differences between every two adjacent points in the displacement curve is obtained to obtain the movement distance.
[0040] Specifically, the initial displacement is set to 0. The difference between adjacent points on the normalized displacement curve is calculated, and the absolute value is taken. The difference is then summed to obtain the distance traveled, which is expressed as: , Among them, S i The distance traveled is represented by 'n', and the number of coordinate points on the displacement curve is represented by 'n'.
[0041] Distance S i The cumulative movement distance of the discrete curve is approximately equivalent to the arc length parameter s in mathematics, providing a geometric scale benchmark for subsequent curvature calculations, unifying the parameters represented in underground dynamometer diagrams, and simultaneously eliminating the influence of the overall curve translation by setting the initial displacement to 0, ensuring that S... i It only reflects the relative movement distance, which is convenient for stroke distance calculation and eliminates displacement offset.
[0042] Optionally, determining the first and second derivatives of the curve data with respect to time includes: The first and second derivatives of the displacement curve with respect to time are determined as follows: dx= = , dy= = , Where dx represents the first derivative of the displacement with respect to time. This represents the displacement coordinate of the (i+1)th point in the normalized displacement curve. Let represent the displacement coordinate of the i-th point in the normalized displacement curve; dy represents the first derivative of the load with respect to time. This represents the load coordinate at the (i+1)th coordinate point in the normalized displacement curve. Δt represents the load coordinate of the i-th coordinate point in the normalized displacement curve; Δt represents the time difference between the (i+1)-th coordinate point and the i-th coordinate point.
[0043] The first and second derivatives of the load curve with respect to time are determined as follows: = , = , in, This represents the second derivative of displacement with respect to time. This represents the first derivative of the displacement of the (i+1)th coordinate point with respect to time. This represents the first derivative of the displacement of the i-th coordinate point with respect to time. This represents the second derivative of the load with respect to time. This represents the first derivative of the load at the (i+1)th coordinate point with respect to time. Let represent the first derivative of the load at the i-th coordinate point with respect to time.
[0044] Optionally, obtaining the rate of change of curvature based on the first derivative and the second derivative includes: Using the distance traveled as a geometric reference, the curvature is obtained based on the first derivative of the displacement, the second derivative of the displacement, the first derivative of the load, and the second derivative of the load using the curvature calculation equation.
[0045] Specifically, the curvature k calculated according to the curvature calculation equation is expressed as: .
[0046] Its curve is as follows Figure 8 As shown.
[0047] Obtain the first derivative of the curvature with respect to time to get the initial rate of change. , is represented as: .
[0048] The generated curves are as follows: Figure 4 As shown.
[0049] The initial rate of change is preprocessed to obtain the rate of change of curvature.
[0050] Optionally, the preprocessing of the initial rate of change to obtain the rate of change of curvature includes: The initial rate of change is filtered using the five-point average filtering method to obtain the rate of change of curvature.
[0051] Specifically, regarding the rate of change of curvature Perform five-point average filtering again to obtain the rate of change of curvature. , is represented as: , in, This represents the rate of change of curvature at the i-th coordinate point. This represents the initial rate of change at the (i-2)th coordinate point. This represents the initial rate of change of the (i-1)th coordinate point. This represents the initial rate of change of the i-th coordinate point. This represents the initial rate of change at the (i+2)th coordinate point. This represents the initial rate of change of the (i+1)th coordinate point.
[0052] It can suppress high-frequency noise in the curvature change rate curve, avoid misjudgment caused by sensor jitter or calculation error, and the smoothed curvature change rate curve is easier to identify peak points, improving the accuracy of inflection point positioning.
[0053] Optionally, multiple target points in the upstroke and downstroke are obtained at preset intervals, and the target points are filtered according to the rate of curvature change and the load change to obtain the upstroke inflection point and the downstroke inflection point, including: The average load value is obtained based on the load curve. The load curve is divided according to the average load value, wherein the portion of the load curve in which the load is less than or equal to the average load value is divided into the downstroke, and the portion of the load curve in which the load is greater than the average load value is divided into the upstroke. Based on the initial point, each point in the upstroke and downstroke is divided and filtered according to the preset interval number to obtain multiple upper target points and multiple lower target points; The first upper inflection point is obtained by obtaining the point with the largest rate of curvature change among the upper target points. The first difference between the average load change of the other points (excluding the first upper inflection point) and the average load change of the other points is obtained by obtaining the first difference between the average load change of the other points (excluding the first upper inflection point). The point corresponding to the largest first difference is selected to obtain the second upper inflection point. The upper stroke inflection point is obtained based on the first upper inflection point and the second upper inflection point. The first lower inflection point is obtained by finding the point with the largest rate of curvature change among the lower target points. The second difference between the average load change of a preset number of points before and the average load change of a preset number of points after the other lower target points (excluding the first lower inflection point) is obtained. The point corresponding to the largest second difference is selected to obtain the second lower inflection point. The lower stroke inflection point is obtained based on the first lower inflection point and the second lower inflection point.
[0054] Specifically, after dividing the stroke, target points are extracted for each stroke. Starting from the initial point, target points are extracted at preset intervals. For example, if there are 50 points in the upstroke and the preset interval is 9, then the upper target points are: point 1 (initial point), point 10, point 20, point 30, point 40, and point 50. The lower target points are obtained in the same way. The first upper inflection point is obtained by identifying the point with the largest rate of curvature change among multiple target points. Then, the average load change of a predetermined number of points before and after each of the other target points is calculated. The difference between these two averages is the first difference value for that target point. This first difference value is compared for each target point other than the first inflection point, and the target point with the largest first difference value is selected as the second upper inflection point. For example, the average load change value b1 of the 10 points before target point B and the average load change value b2 of the 10 points after it are calculated. The difference between b1 and b2 is the first difference value b for target point B. Similarly, the average load change value c1 of the 10 points before target point C and the average load change value c2 of the 10 points after it are calculated. The difference between c1 and c2 is the first difference value c for target point C. If b is greater than c, then target point B is selected as the second upper inflection point. The method for obtaining the downstroke inflection point is the same as that for the upstroke inflection point and will not be described further here.
[0055] Optionally, the method for identifying inflection points on the underground dynamometer card of the oil pump further includes: The inverse normalization process is performed on the inflection point of the upstroke and the inflection point of the downstroke respectively to obtain the true coordinate values of the inflection point of the upstroke and the inflection point of the downstroke.
[0056] Specifically, the inflection points of the upstroke and downstroke are denormalized, and the true coordinate values are calculated from the extreme values of the original data. The algorithm results are converted into physical quantities with engineering significance (such as displacement in meters and load in Newtons) to facilitate on-site personnel in analyzing pump conditions (such as effective stroke and fullness). Furthermore, the denormalized coordinates directly correspond to the actual positions on the indicator diagram, providing a basis for subsequent liquid production calculations and fault diagnosis.
[0057] like Figure 6As shown in the figure, an embodiment of the present invention provides a device 600 for identifying inflection points on an underground indicator diagram of an oil pump, comprising: The preprocessing module 610 is used to preprocess the initial curve data of the pre-acquired underground dynamometer diagram to obtain curve data; The first calculation module 620 is used to determine the first and second derivatives of the curve data with respect to time; The second calculation module 630 is used to obtain the rate of change of curvature based on the first derivative and the second derivative; The lookup module 640 is used to divide the stroke according to the curve data to obtain the upstroke and the downstroke, obtain multiple target points in the upstroke and the downstroke according to a preset interval number of points, and filter the target points according to the curvature change rate and the load change to obtain the upstroke inflection point and the downstroke inflection point.
[0058] like Figure 7 As shown, an electronic device 700 provided in this embodiment of the invention includes a memory 710 and a processor 720; the memory 710 is used to store a computer program; the processor 720 is used to implement the above-described method for identifying inflection points on underground indicator diagrams of oil pumps when the computer program is executed.
[0059] Alternatively, an electronic device 700 includes a memory 710 and a processor 720 coupled to the memory 710; the memory 710 is configured to store a computer program; and the processor 720 is configured to perform the following operations when the computer program is executed: The initial curve data of the pre-acquired underground dynamometer diagram is preprocessed to obtain curve data; Determine the first and second derivatives of the curve data with respect to time; The rate of change of curvature is obtained based on the first derivative and the second derivative; The stroke is divided according to the curve data to obtain the upstroke and the downstroke. Multiple target points in the upstroke and the downstroke are obtained according to a preset interval number of points. The target points are then filtered according to the curvature change rate and the load change to obtain the upstroke inflection point and the downstroke inflection point.
[0060] This invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the method for identifying inflection points on underground indicator diagrams of oil pumps as described above.
[0061] Alternatively, a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the following operations: The initial curve data of the pre-acquired underground dynamometer diagram is preprocessed to obtain curve data; Determine the first and second derivatives of the curve data with respect to time; The rate of change of curvature is obtained based on the first derivative and the second derivative; The stroke is divided according to the curve data to obtain the upstroke and the downstroke. Multiple target points in the upstroke and the downstroke are obtained according to a preset interval number of points. The target points are then filtered according to the curvature change rate and the load change to obtain the upstroke inflection point and the downstroke inflection point.
[0062] The present invention will now be described an electronic device 700 that can serve as a server or client of the present invention, which is an example of a hardware device that can be applied to various aspects of the present invention. Electronic device 700 is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device 700 can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0063] Electronic device 700 includes a computing unit that can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) or a computer program loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The computing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0064] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. In this application, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention according to actual needs. Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units can be implemented in hardware or as software functional units.
[0065] While the present invention has been disclosed above, its scope of protection is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, and all such changes and modifications will fall within the scope of protection of the present invention.
Claims
1. A method for identifying inflection points on underground dynamometer cards of oil pumps, characterized in that, include: The initial curve data of the pre-acquired underground dynamometer diagram is preprocessed to obtain curve data; Determine the first and second derivatives of the curve data with respect to time; The rate of change of curvature is obtained based on the first derivative and the second derivative; The stroke is divided according to the curve data to obtain the upstroke and the downstroke. Multiple target points in the upstroke and the downstroke are obtained according to a preset interval number of points. The target points are then filtered according to the curvature change rate and the load change to obtain the upstroke inflection point and the downstroke inflection point.
2. The method for identifying inflection points on underground dynamometer cards of oil pumps according to claim 1, characterized in that, The curve data includes displacement curves, load curves, and travel distances; the preprocessing of the initial curve data from the pre-acquired underground dynamometer diagram to obtain curve data includes: The initial curve data is filtered using a five-point average filtering method to obtain a smooth curve. The smooth curve is normalized to obtain the displacement curve and the load curve; The distance traveled is obtained from the displacement curve.
3. The method for identifying inflection points on underground dynamometer cards of oil pumps according to claim 2, characterized in that, Determining the first and second derivatives of the curve data with respect to time includes: Determine the first and second derivatives of the displacement curve with respect to time; Determine the first and second derivatives of the load curve with respect to time.
4. The method for identifying inflection points on underground dynamometer cards of oil pumps according to claim 3, characterized in that, The method of obtaining the rate of change of curvature based on the first derivative and the second derivative includes: Using the moving distance as a geometric scale reference, the curvature is obtained based on the first derivative of the displacement, the second derivative of the displacement, the first derivative of the load, and the second derivative of the load using the curvature calculation equation; Obtain the first derivative of the curvature with respect to time to get the initial rate of change; The initial rate of change is preprocessed to obtain the rate of change of curvature.
5. The method for identifying inflection points on underground dynamometer cards of oil pumps according to claim 2, characterized in that, The stroke is divided according to the curve data to obtain the upstroke and downstroke. Multiple target points in the upstroke and downstroke are obtained at preset intervals. The target points are then filtered according to the rate of curvature change and the load change to obtain the upstroke inflection point and the downstroke inflection point, including: The average load value is obtained based on the load curve. The load curve is divided according to the average load value, wherein the portion of the load curve in which the load is less than or equal to the average load value is divided into the downstroke, and the portion of the load curve in which the load is greater than the average load value is divided into the upstroke. Based on the initial point, each point in the upstroke and downstroke is divided and filtered according to the preset interval number to obtain multiple upper target points and multiple lower target points; The first upper inflection point is obtained by obtaining the point with the largest rate of curvature change among the upper target points. The first difference between the average load change of the other points (excluding the first upper inflection point) and the average load change of the other points is obtained by obtaining the first difference between the average load change of the other points (excluding the first upper inflection point). The point corresponding to the largest first difference is selected to obtain the second upper inflection point. The upper stroke inflection point is obtained based on the first upper inflection point and the second upper inflection point. The first lower inflection point is obtained by finding the point with the largest rate of curvature change among the lower target points. The second difference between the average load change of a preset number of points before and the average load change of a preset number of points after the other lower target points (excluding the first lower inflection point) is obtained. The point corresponding to the largest second difference is selected to obtain the second lower inflection point. The lower stroke inflection point is obtained based on the first lower inflection point and the second lower inflection point.
6. The method for identifying inflection points on underground dynamometer cards of oil pumps according to claim 2, characterized in that, The step of obtaining the moving distance based on the displacement curve includes: Using the initial displacement as a reference, the sum of the absolute values of the differences between every two adjacent points in the displacement curve is obtained to obtain the movement distance.
7. The method for identifying inflection points on underground dynamometer cards of oil pumps according to claim 1, characterized in that, Also includes: The inverse normalization process is performed on the inflection point of the upstroke and the inflection point of the downstroke respectively to obtain the true coordinate values of the inflection point of the upstroke and the inflection point of the downstroke.
8. A device for identifying inflection points on underground dynamometer charts of oil pumps, characterized in that, include: The preprocessing module is used to preprocess the initial curve data of the pre-acquired underground dynamometer diagram to obtain curve data; The first calculation module is used to determine the first and second derivatives of the curve data with respect to time; The second calculation module is used to obtain the rate of change of curvature based on the first derivative and the second derivative; The search module is used to divide the stroke according to the curve data to obtain the top stroke and the bottom stroke, obtain multiple target points in the top stroke and the bottom stroke according to a preset interval number of points, and filter the target points according to the curvature change rate and load change to obtain the top stroke inflection point and the bottom stroke inflection point.
9. An electronic device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is configured to, when executing the computer program, implement the method for identifying inflection points on underground indicator diagrams of oil pumps as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method for identifying inflection points on underground dynamometer diagrams of oil pumps as described in any one of claims 1 to 7.