A method and system for extracting dynamic features of continuous indicator diagram of oil pumping unit

By pre-processing and extracting the characteristic value of the pumping engine's power diagram, and combining the storage method selected by the user, dynamically store the characteristic value, the problem of large data volume and high information dimensions of the continuous power diagram of the oil pumping engine in the oil field is solved, and the problem of large data volume and high information dimensions is realized. Dynamic feature extraction and management are provided, and various applications are supported.

CN115080632BActive Publication Date: 2024-12-06CHINA PETROLEUM & CHEMICAL CORP +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110305743.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-12
Publication Date
2024-12-06
Estimated Expiration
2041-03-12

AI Technical Summary

Technical Problem

The prior art is difficult to dynamic feature extraction of the continuous power diagram of the oil pump in the oil field, resulting in large data volume and high information dimensions, making it difficult to apply to fault diagnosis and data mining, and users cannot manage the extracted feature values.

Method used

By obtaining the power diagram of the current time, preprocessing, extracting the eigenvalues, and judging and dynamically storing the eigenvalues, including five-point triad smoothing method processing, normalization, calculating the second-order derivative, extracting geometry, and folding curves and outline feature values, and dynamically store feature values ​​based on the storage method selected by the user and the historical feature values.

Benefits of technology

Realize dynamic feature extraction of continuous power diagram of oil pump, reduce data volume and information dimensions, support big data mining analysis and working condition diagnosis, meet users' management and display needs for feature values, and provide effective oil field production data utilization basis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115080632B_ABST
    Figure CN115080632B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for extracting dynamic features of a continuous indicator diagram of an oil pumping unit, and relates to the technical field of oil extraction. The technical scheme is: obtaining the indicator diagram at the current moment; preprocessing the indicator diagram at the current moment; extracting the characteristic value of the indicator diagram at the current moment; judging and dynamically storing the characteristic value at the current moment. The beneficial effects of the present invention are: the method for extracting dynamic features of a continuous indicator diagram of an oil pumping unit provided by the present invention can realize the dynamic feature extraction of the continuous indicator diagram of the oil pumping unit, reducing the data volume and information dimension of the original indicator diagram, and can be used for big data mining and analysis applications, working condition diagnosis applications, and dynamic liquid level calculation or production calculation and other applications of big data, and can manage and display the extracted characteristic values, meeting the needs of users for the characteristic values ​​of the indicator diagram, and laying a foundation for the effective use of the continuous indicator diagram of the oil pumping unit in oil field production.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of oil extraction, and in particular to a method and system for extracting dynamic features of a continuous indicator diagram of an oil pumping unit. Background Art

[0002] The closed figure with the displacement of the pumping unit's suspension point as the horizontal coordinate and the load of its suspension point as the vertical coordinate is called the pumping unit indicator diagram. The pumping unit indicator diagram is one of the essential production data in oil field production. It can intuitively reflect the working status of the sucker rod and the pump. It is widely used in the selection of ground electromechanical equipment for pumping units, downhole fault diagnosis, dynamic liquid level calculation, and production calculation. Therefore, the measurement, transmission and storage of the pumping unit indicator diagram are of great significance to the production and management of oil fields. Conventional single indicator diagram Figure 1 Generally, it needs a displacement sequence of 200 to 300 data points and a load sequence of the same data points. The dynamometer diagram has a large amount of data and a high information dimension, which makes it difficult to apply directly. Extracting its features is the primary link in the application of dynamometer diagrams such as fault diagnosis and data mining. Most of the conventional dynamometer diagram feature extraction technologies are aimed at the static characteristic analysis of a single dynamometer diagram. In order to further improve the management efficiency in the actual production of oil fields, it is necessary to measure the dynamometer diagram of the pumping unit 24 hours a day to form a continuous dynamometer diagram. For this kind of continuous dynamometer diagram with large data volume, high information dimension and continuous arrival, conventional methods are difficult to apply directly, and dynamic feature extraction is required. At the same time, the current feature extraction of the dynamometer diagram of the pumping unit can only be used for one application, and the type of extracted feature value is single and fixed, which cannot be managed by users. Summary of the invention

[0003] In view of the above technical problems, the present invention aims to provide a method for extracting dynamic features of a continuous dynamometer diagram of a pumping unit, so as to help make more comprehensive and effective use of the continuous dynamometer diagram of the pumping unit in oil field production.

[0004] The technical solution includes the following steps:

[0005] S1, obtain the current moment indicator diagram;

[0006] S2, preprocessing the current moment indicator diagram;

[0007] S3, extracting the characteristic value of the current indicator diagram;

[0008] S4. Determine and dynamically store the characteristic value at the current moment.

[0009] Preferably, in S1, obtaining the current moment indicator diagram is specifically:

[0010] Step S11, according to the pumping unit stroke period T, cache the data collected by the dynamometer of two pumping unit stroke periods T, and mark it as the current time ti, for example, in the format of 2020 / 10 / 3 11:03:00;

[0011] Step S12, according to the rule that the suspension point displacement starts from the bottom dead point as 0, increases to the top dead point as the maximum value, and then drops to the bottom dead point as 0, collect data from the cached dynamometer, obtain the suspension point displacement sequence and the corresponding suspension point load sequence, and obtain the dynamometer at time ti with the displacement as the abscissa and the load as the ordinate;

[0012] The suspension point displacement sequence s = [s(n)], and the corresponding suspension point load sequence f = [f(n)], where n = 1, 2, …, N, and N is the total number of sampling points.

[0013] Preferably, in said S2, preprocessing the current moment indicator diagram is specifically performed as follows:

[0014] S21, performing five-point cubic smoothing processing on the suspension point displacement sequence s and the suspension point load sequence f to remove noise interference;

[0015] S22, normalize the suspension point displacement sequence s and the suspension point load sequence f, and obtain the normalized displacement sequence:

[0016]

[0017] The normalized suspension point load sequence is,

[0018]

[0019] S23. Calculate the second-order derivative of the suspension load, that is, the second-order gradient: f′=gradient(f), f″=gradient(f′), where gradient represents the gradient to be solved, such as the gradient function in the MATLAB programming language.

[0020] Preferably, in said S3, extracting the characteristic value of the current indicator diagram is specifically,

[0021] S31, extracting geometric characteristic values, wherein the geometric characteristic values ​​include upstroke area, downstroke area, maximum load position percentage, minimum load position percentage, minimum peak position percentage of the second-order derivative of the load upstroke, maximum peak position percentage of the second-order derivative of the load downstroke, normalized starting value of the load, normalized top dead center value of the load, maximum peak-to-peak value of the detrended fluctuation in the load reduction stage, maximum peak position percentage of the detrended peak in the load reduction stage, and normalized area;

[0022] S32, extracting the characteristic value of the folding curve, dividing the normalized dynamometer diagram into segments, performing difference according to the displacement correspondence in a certain manner, and obtaining a difference curve, wherein the difference curve contains information of the difference curve, thereby achieving data compression;

[0023] S33, extracting the contour eigenvalue, selecting several equally divided displacement values ​​and load values ​​at equal intervals by the interpolation method, forming the contour eigenvalue, that is, taking several displacement values ​​as the horizontal coordinates and several load values ​​as the vertical coordinates, a sparse contour dynamometer diagram containing most of the dynamometer diagram information can be obtained. The number of equally divided selected is preferably about 50. When the value is too large, the number stored is large. When the value is small, the curve description is not accurate enough. 50 equally divided is the most preferred.

[0024] Preferably, the step S31, extracting geometric eigenvalues, specifically includes:

[0025] (1) The upstroke area is,

[0026] Among them, j m is the coordinate point number when the suspension point is displaced to the upper dead center, that is, [s m ,j m ] = max(s);

[0027] (2) The downstroke area is,

[0028] (3) The percentage of the maximum load position is, P bm =s(j pm ) / s(j m )×100%;

[0029] Among them, [f m ,j pm ]=max(f); In mathematics, especially in the function representation in MATLAB language, f m represents the maximum value, j pm Indicates the coordinate point number of the maximum value. For example: in a series of numbers, the maximum value of the third number is 8, then, f m =8,j pm =3;

[0030] (4) The percentage of the minimum load position is, P bn =100-s(j pn ) / s(j m )×100%;

[0031] Among them, [f n ,j pn ]=min(f);f n is the minimum value of signal f, jpn is the coordinate point number where the minimum value is located;

[0032] (5) The percentage of the minimum peak position of the second-order derivative of the load is, P ds =s(j dpn ) / s(j m )×100%, where j dpn is the number of sampling points at the minimum peak of the second-order derivative of the load.

[0033] The specific steps include:

[0034] Step 1: Find the negative second-order derivative of the upthrust load, i.e. -f″(1:j m ) and its sampling points, that is, [f pn ,j pn ]=findpeaks[-f″(1:j m )], findpeaks means to find peaks, such as the peak finding function in the MATLAB programming language, f pn means -f″(1:j m ) in all peak values;

[0035] Step 2: Get f pn The maximum peak value and its coordinate points in [f pnm ,j pnm ]=max(f pn ), where f pnm f pn The maximum peak value in j pnm Indicates the maximum peak value f pn The number of coordinate points in

[0036] Step 3: Obtain the number of sampling points for the minimum peak value of the load second-order derivative, i.e., j dpn =j pn (j dpm ).

[0037] (6) The maximum peak position percentage of the load second-order derivative undershoot is, P dx =100-s(j dpm ) / s(j m )×100%;

[0038] Among them, j dpm is the sampling point at the maximum peak position of the load second-order derivative undershoot. The specific calculation steps are as follows:

[0039] Step 1: Find the second-order derivative of the downstroke load, i.e. f″(j m :N) and its sampling points, that is, [f m ,j pm] = findpeaks[f″(j m :N)]; where f m represents f″(j m :N) of all peak values,j pm Indicates the coordinate point number where the peak value is located;

[0040] Step 2: Get f pm The maximum peak value and its coordinate points in [f pmm ,j pmm ]=max(f pm );

[0041] Step 3: Obtain the number of sampling points for the minimum peak value of the second-order derivative of the load, i.e., j dpm =j pm (j pmm )+j m -1;

[0042] (7) The normalized starting value of the load is, f gq =f g (1)×100%, f g represents the normalized loading;

[0043] (8) The normalized top dead center value of the load is, f gs =f g (j m )×100%;

[0044] (9) The maximum peak-to-peak value of the detrended fluctuation during the load reduction phase is f ji ;f ji The specific steps to obtain are:

[0045] Step 1: Calculate the trend line from the top dead center to the maximum peak of the second-order derivative of the load, that is, f qu =k qu ×s g (j m :j dpm )+b qu ;

[0046] Among them, k qu Represents the slope of the curve, calculated as: k qu =[f g (j dpm )-f g (j m )] / [s g (j dpm )-s g (j m )],b qu Represents the intercept of the curve, and the calculation formula is: b qu =kqu ×s g (j m )-f g (j m );s g (j m :j dpm ) represents the number of sampling points j m to dpm The normalized displacement of

[0047] Step 2: Calculate the load shedding fluctuation curve, i.e. f bo =f g (j m :j dpm )-f qu ;

[0048] Step 3: Find the peak value in the fluctuation curve and its position coordinate points, that is, [f bq ,j bq ]=findpeaks(|f bo |);f bq It means |f bo The peak value of | bq Indicates the coordinate point number where the peak value is located;

[0049] Step 4: Obtain the coordinate points of the maximum peak position, i.e. [f jian ,j bpm ]=max(f bq );

[0050] Step 5: Get the maximum peak-to-peak value, i.e. f ji =f bo (j bp (j bpm ))×100%;

[0051] (10), the percentage of the maximum peak position of the detrended state in the load reduction stage is, p ji =100-s g (j bp (j bpm ))×100%;

[0052] (11), the normalized area is,

[0053] Preferably, the S32 extracts the characteristic value of the folding curve, divides the normalized dynamometer diagram into segments, and performs difference according to the displacement correspondence in a certain manner to obtain a difference curve, and the difference curve contains information of the difference curve, thereby achieving data compression, specifically:

[0054] S321, divide the normalized upstroke displacement from 0 to 1 into 40 equal parts to obtain the equal-divided displacement value: sgf =linspace(0,1,40), where linspace means 40 equal divisions between 0, 1, and 40, such as the equal division calculation instruction function in the MATLAB programming language, which obtains a 40-equally divided displacement value sequence from 0 to 1;

[0055] S322, according to the equally divided displacement value s gf , the interpolation method is used in the upstroke to obtain the number of interpolation points n sm1 =interp1[s g (1:j m ),1:j m ,s gf ], where interp1 represents interpolation calculation, such as the interpolation function in the MATLAB programming language, and the corresponding number of displacement points is obtained after taking the integer, that is, n sm =fix(n sm1 ), where fix represents a rounding operation, such as the rounding function in the MATLAB programming language, to obtain the corresponding normalized upstroke load: f gs =[f g (n sm )];

[0056] S323, divide the displacement value s into equal parts gf Arrange in reverse order, and use interpolation method to get the number of interpolation points n in the downstroke xm1 =interp1[s g (j m :end),j m :N,fliplr(s gf )], where fliplr represents the inversion of an array, such as the inversion function in the MATLAB programming language, which takes an integer to get the corresponding number of points of the displacement, that is, n xm =fix(n xm1 ), so as to obtain the normalized downstroke load value at the same displacement value: f gx =[f g (n xm )];

[0057] S324, make the difference to perform the first fold: f gc1 =f gs -f gx ;

[0058] S325, make a difference to perform the second folding, that is, the first 20 load values ​​of the first folding curve minus the last 20 load values: f gc2 =f gc1 (1:20)-f gc1 (21:40).

[0059] Preferably, in said S33, extracting the profile characteristic value, a number of displacement values ​​and load values ​​are selected at equal intervals by an interpolation method to form the profile characteristic value, that is, a sparse profile indicator diagram containing most of the indicator diagram information can be obtained by taking a number of displacement values ​​as the abscissa and a number of load values ​​as the ordinate, specifically:

[0060] S331, construct normalized time t g =linspace(0,1,N),

[0061] S332, select 50 displacement values ​​at equal intervals by interpolation method: s gl = interp1(0, 1, N);

[0062] S333. Select 50 load values ​​at equal intervals by interpolation method: f gl =interp1(t g , f g , t gl );

[0063] S334. A contour dynamometer diagram is obtained with 50 displacement values ​​as the horizontal axis and 50 load values ​​as the vertical axis.

[0064] The extracted contour feature values ​​are implemented as follows Figure 4 shown.

[0065] Preferably, in S4, judging and dynamically storing the characteristic value at the current moment is specifically as follows:

[0066] S41. Read the feature value of the required historical moment, i.e., the ti-1 moment (e.g., in the format of 2020 / 10 / 2 20:03:00), from the dynamic feature database according to the selected historical moment selected by the user;

[0067] S42, calculate the change rate of the geometric eigenvalue at the current time ti and the geometric eigenvalue at the historical time ti-1, and select the one with the largest change rate value. When its change rate is greater than or equal to 5%, that is, When the extracted feature value is stored in the dynamic feature database with time ti as the mark, C d is the geometric eigenvalue extracted at the current time ti, C l is the geometric eigenvalue extracted at the historical moment ti-1; when the change rate is less than 5%, that is, When , the feature value is not stored and the process goes to step S1.

[0068] A pumping unit continuous indicator diagram dynamic characteristic system for implementing the above method comprises:

[0069] The dynamometer diagram acquisition module obtains the dynamometer diagram at the current moment;

[0070] The indicator diagram preprocessing module preprocesses the indicator diagram at the current moment;

[0071] The eigenvalue management module of the indicator diagram provides the optional eigenvalue extraction types and eigenvalue storage methods, interacts with the user, and receives the user's selection;

[0072] The dynamometer diagram feature value extraction module extracts features from the preprocessed dynamometer diagram at the current moment according to the feature value type selected by the user;

[0073] The module for judging the characteristic value of the indicator diagram and dynamically storing the characteristic value judges the characteristic value of the indicator diagram at the current moment and the storage requirement selected by the user and dynamically stores the characteristic value;

[0074] The dynamometer diagram characteristic value display module displays the characteristic value of the dynamometer diagram at the current moment.

[0075] Preferably, the dynamometer diagram acquisition module receives and accesses the suspension point displacement measurement sequence and the load measurement sequence of two stroke cycles, records the access time of the data as time ti, selects the suspension point displacement sequence and the load sequence of one stroke cycle according to the variation law of the suspension point displacement, and obtains a complete dynamometer diagram;

[0076] The dynamometer diagram preprocessing module 2 performs smoothing and noise removal processing, normalization processing, and calculation of the second-order derivative of the load sequence on the obtained suspension point displacement measurement sequence and load measurement sequence;

[0077] The dynamometer diagram characteristic value management module provides selectable characteristic value extraction types and characteristic value storage methods, interacts with the user, and receives the type of characteristic value extraction and characteristic value storage method selected by the user;

[0078] Among them, the types of feature value extraction provided to the user include: folding curve feature values ​​and contour feature values. The user can choose one or all, while the geometric feature values ​​must be calculated and are not within the selection range; the feature value storage methods provided to the user include: comparing and storing with the feature values ​​of historical moment 1, comparing and storing with the feature values ​​of historical moment 2, and comparing and storing with the feature values ​​of historical moment 3. Among them, historical moment 1, historical moment 2, and historical moment 3 are represented by ti-1 moment for convenience.

[0079] The dynamometer diagram eigenvalue extraction module calculates and extracts geometric eigenvalues, folding curve eigenvalues ​​or contour eigenvalues ​​according to the eigenvalue types determined by the dynamometer diagram eigenvalue management module;

[0080] The dynamometer diagram characteristic value judgment and dynamic storage module reads the characteristic value at time ti-1 from the dynamic characteristic value database according to the historical time ti-1 proposed by the user, calculates the change rate between the geometric characteristic values ​​at time ti and time ti-1, and when the maximum change rate is greater than 5%, stores the extracted characteristic value and the time mark ti in the dynamic characteristic database; when the maximum change rate is less than 5%, does not save the characteristic value, transfers to the dynamometer diagram acquisition module, and enters the next cycle;

[0081] The dynamometer diagram characteristic value display module displays the geometric characteristic values ​​at time ti and time ti-1 in a comparative manner in the form of a bar graph, and displays the folding curve characteristic value or the contour characteristic value in a graphical manner.

[0082] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention are as follows: the dynamic feature extraction method of the continuous indicator diagram of the oil pumping unit provided by the present invention can realize the dynamic feature extraction of the continuous indicator diagram of the oil pumping unit, reduce the data volume and information dimension of the original indicator diagram, and can be used for big data mining and analysis applications, working condition diagnosis applications, dynamic liquid level calculation or production calculation and other applications. The extracted characteristic values ​​can be managed and displayed, meeting the user's needs for the characteristic values ​​of the indicator diagram, and laying the foundation for the effective use of the continuous indicator diagram of the oil pumping unit in oil field production. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] Figure 1 The figure is a schematic diagram of a method flow of an embodiment of the present invention.

[0084] Figure 2 It is a schematic diagram of normalized dynamometer diagrams and detrended load shedding curves for four typical operating conditions of an embodiment of the present invention.

[0085] Figure 3 It is a schematic diagram of the folding curve characteristics of the pumping unit indicator diagram according to an embodiment of the present invention.

[0086] Figure 4 It is a schematic diagram of the contour characteristics of the pumping unit indicator diagram according to an embodiment of the present invention.

[0087] Figure 5 The structure block diagram of the dynamic feature extraction system of the continuous indicator diagram of the oil pumping unit according to the embodiment of the present invention.

[0088] Figure 6 It is a schematic diagram showing the geometric features of an embodiment of the present invention. DETAILED DESCRIPTION

[0089] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. Of course, the specific embodiments described here are only used to explain the present invention and are not used to limit the present invention.

[0090] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0091] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.

[0092] In the description of the invention, it should be noted that, unless otherwise clearly specified and limited, the terms "install", "connect", "connect", and "set" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the invention can be understood according to specific circumstances.

[0093] Example 1

[0094] See also Figures 1 to 4 ,and Figure 6 The present invention provides a method for extracting dynamic features of a continuous indicator diagram of an oil pumping unit, comprising the steps of:

[0095] S1, obtain the current moment indicator diagram;

[0096] In S1, the current moment indicator diagram is obtained as follows:

[0097] Step S11, according to the pumping unit stroke period T, cache the data collected by the dynamometer of two pumping unit stroke periods T, and mark it as the current time ti, for example, in the format of 2020 / 10 / 3 11:03:00;

[0098] Step S12, according to the rule that the suspension point displacement starts from the bottom dead point as 0, increases to the top dead point as the maximum value, and then drops to the bottom dead point as 0, collect data from the cached dynamometer, obtain the suspension point displacement sequence and the corresponding suspension point load sequence, and obtain the dynamometer at time ti with the displacement as the abscissa and the load as the ordinate;

[0099] The suspension point displacement sequence s = [s(n)], and the corresponding suspension point load sequence f = [f(n)], where n = 1, 2, …, N, and N is the total number of sampling points.

[0100] S2, preprocessing the current moment indicator diagram;

[0101] In S2, the current indicator diagram is preprocessed as follows:

[0102] S21, performing five-point cubic smoothing processing on the suspension point displacement sequence s and the suspension point load sequence f to remove noise interference;

[0103] S22, normalize the suspension point displacement sequence s and the suspension point load sequence f, and obtain the normalized displacement sequence:

[0104]

[0105] The normalized suspension point load sequence is,

[0106]

[0107] S23. Calculate the second-order derivative of the suspension load, that is, the second-order gradient: f′=gradient(f), f″=gradient(f′), where gradient represents the gradient to be solved, such as the gradient function in the MATLAB programming language.

[0108] S3, extracting the characteristic value of the current indicator diagram;

[0109] S31, extracting geometric eigenvalues, the geometric eigenvalues ​​including upstroke area, downstroke area, maximum load position percentage, minimum load position percentage, minimum peak position percentage of the second-order derivative of the load upstroke, maximum peak position percentage of the second-order derivative of the load downstroke, normalized starting value of the load, normalized top dead center value of the load, maximum peak-to-peak value of the detrended fluctuation in the load reduction stage, maximum peak position percentage of the detrended peak in the load reduction stage, and normalized area;

[0110] S32, extracting the characteristic value of the folding curve, dividing the normalized dynamometer diagram into segments, performing difference according to the displacement correspondence in a certain manner, and obtaining a difference curve, wherein the difference curve contains information of the difference curve, thereby achieving data compression;

[0111] S33, extracting the contour eigenvalue, selecting several equally divided displacement values ​​and load values ​​at equal intervals by the interpolation method, forming the contour eigenvalue, that is, taking several displacement values ​​as the horizontal coordinates and several load values ​​as the vertical coordinates, a sparse contour dynamometer diagram containing most of the dynamometer diagram information can be obtained. The number of equally divided selected is preferably about 50. When the value is too large, the number stored is large. When the value is small, the curve description is not accurate enough. 50 equally divided is the most preferred.

[0112] S4. Determine and dynamically store the characteristic value at the current moment, specifically,

[0113] S41. Read the feature value of the required historical moment, i.e., the ti-1 moment (e.g., in the format of 2020 / 10 / 2 20:03:00), from the dynamic feature database according to the selected historical moment selected by the user;

[0114] S42, calculate the change rate of the geometric eigenvalue at the current time ti and the geometric eigenvalue at the historical time ti-1, and select the one with the largest change rate value. When its change rate is greater than or equal to 5%, that is, When the extracted feature value is stored in the dynamic feature database with time ti as the mark, C d is the geometric eigenvalue extracted at the current time ti, C l is the geometric eigenvalue extracted at the historical moment ti-1; when the change rate is less than 5%, that is, When , the feature value is not stored and the process goes to step S1.

[0115] Example 2

[0116] On the basis of Example 1, step S31, extracting geometric characteristic values, the geometric characteristic values ​​include upstroke area, downstroke area, maximum load position percentage, minimum load position percentage, load second-order derivative upstroke minimum peak position percentage, load second-order derivative downstroke maximum peak position percentage, normalized starting value of load, normalized top dead center value of load, maximum peak-to-peak value of detrended fluctuation in unloading stage, maximum peak position percentage of detrended in unloading stage, and normalized area; specifically,

[0117] (1) The upstroke area is,

[0118] Among them, j m is the coordinate point number when the suspension point is displaced to the upper dead center, that is, [s m ,j m ] = max(s);

[0119] (2) The downstroke area is,

[0120] (3) The percentage of the maximum load position is, P bm =s(j pm ) / s(j m )×100%;

[0121] Among them, [f m ,j pm ]=max(f); In mathematics, especially in the function representation in MATLAB language, f m represents the maximum value, j pm Indicates the coordinate point number of the maximum value. For example: in a series of numbers, the maximum value of the third number is 8, then, f m =8,j pm =3;

[0122] (4) The percentage of the minimum load position is, P bn =100-s(j pn ) / s(j m )×100%;

[0123] Among them, [f n ,j pn ]=min(f);f n is the minimum value of signal f, j pn is the coordinate point number where the minimum value is located;

[0124] (5) The percentage of the minimum peak position of the second-order derivative of the load is, P ds =s(j dpn ) / s(j m )×100%, where j dpn is the number of sampling points at the minimum peak of the second-order derivative of the load.

[0125] The specific steps include:

[0126] Step 1: Find the negative second-order derivative of the upthrust load, i.e. -f″(1:j m ) and its sampling points, that is, [f pn ,j pn ]=findpeaks[-f″(1:j m )], findpeaks means to find peaks, such as the peak finding function in the MATLAB programming language, f pn means -f″(1:j m ) in all peak values;

[0127] Step 2: Get f pn The maximum peak value and its coordinate points in [f pnm ,j pnm ]=max(f pn ), where fpnm f pn The maximum peak value in j pnm Indicates the maximum peak value f pn The number of coordinate points in

[0128] Step 3: Obtain the number of sampling points for the minimum peak value of the load second-order derivative, i.e., j dpn =j pn (j dpm ).

[0129] (6) The maximum peak position percentage of the load second-order derivative undershoot is, P dx =100-s(j dpm ) / s(j m )×100%;

[0130] Among them, j dpm is the sampling point at the maximum peak position of the load second-order derivative undershoot. The specific calculation steps are as follows:

[0131] Step 1: Find the second-order derivative of the downstroke load, i.e. f″(j m :N) and its sampling points, that is, [f m ,j pm ] = findpeaks[f″(j m :N)]; where f m represents f″(j m :N) of all peak values,j pm Indicates the coordinate point number where the peak value is located;

[0132] Step 2: Get f pm The maximum peak value and its coordinate points in [f pmm ,j pmm ]=max(f pm );

[0133] Step 3: Obtain the number of sampling points for the minimum peak value of the second-order derivative of the load, i.e., j dpm =j pm (j pmm )+j m -1;

[0134] (7) The normalized starting value of the load is, f gq =f g (1)×100%, f g represents the normalized loading;

[0135] (8) The normalized top dead center value of the load is, f gs =f g (j m )×100%;

[0136] (9) The maximum peak-to-peak value of the detrended fluctuation during the load reduction phase is f ji ;f ji The specific steps to obtain are:

[0137] Step 1: Calculate the trend line from the top dead center to the maximum peak of the second-order derivative of the load, that is, f qu =k qu ×s g (j m :j dpm )+b qu ;

[0138] Among them, k qu Represents the slope of the curve, calculated as: k qu =[f g (j dpm )-f g (j m )] / [s g (j dpm )-s g (j m )],b qu Represents the intercept of the curve, and the calculation formula is: b qu =k qu ×s g (j m )-f g (j m );s g (j m :j dpm ) represents the number of sampling points j m to dpm The normalized displacement of

[0139] Step 2: Calculate the load shedding fluctuation curve, i.e. f bo =f g (j m :j dpm )-f qu ;

[0140] Step 3: Find the peak value in the fluctuation curve and its position coordinate points, that is, [f bq ,j bq ]=findpeaks(|f bo |);f bq It means |f bo The peak value of | bq Indicates the coordinate point number where the peak value is located;

[0141] Step 4: Obtain the coordinate points of the maximum peak position, i.e. [f jian ,j bpm ]=max(fbq );

[0142] Step 5: Get the maximum peak-to-peak value, i.e. f ji =f bo (j bp (j bpm ))×100%;

[0143] (10), the percentage of the maximum peak position of the detrended state in the load reduction stage is, p ji =100-s g (j bp (j bpm ))×100%;

[0144] (11), the normalized area is,

[0145] The four typical working condition normalized dynamometer diagrams and detrended load shedding curve schematic diagrams provided by the embodiments of the present invention are as follows: Figure 2 shown.

[0146] The geometric characteristic values ​​extracted from four typical working conditions provided by the embodiment of the present invention are shown in Table 1.

[0147] Table 1 Geometric eigenvalues ​​extracted from typical working conditions

[0148] Typical working condition indicator diagram <![CDATA[S s ]]> <![CDATA[S x ]]> <![CDATA[p bm ]]> <![CDATA[p bn ]]> <![CDATA[p ds ]]> <![CDATA[p dx ]]> <![CDATA[f gq ]]> <![CDATA[f gs ]]> <![CDATA[f ji ]]> <![CDATA[p ji ]]> <![CDATA[S gd ]]> Condition 1 53.5 58.8 10.5 12.9 10.5 11.8 23.8 81.5 -4.7 9.7 75.2 Condition 2 84.2 64.1 14.7 24.4 13.7 24.4 24.5 76.1 18.4 13.5 61.2 Condition 3 105.2 70.9 56.4 6.3 4.0 4.8 15.6 59.7 -11.6 1.2 86.5 Condition 4 25.2 98.3 84.2 52.0 0.8 48.7 65.1 93.9 -17.6 16.3 74.5

[0149] The extracted geometric eigenvalues ​​can be used for big data mining and analysis, such as classification, prediction, clustering, association and other analyses, and can also be used for fault diagnosis.

[0150] Example 3

[0151] On the basis of Example 2, S32, extract the characteristic value of the folding curve, divide the normalized dynamometer diagram into segments, and make a difference in a certain way according to the displacement correspondence to obtain a difference curve. The difference curve contains the information of the difference curve, thereby realizing data compression, specifically:

[0152] S321, divide the normalized upstroke displacement from 0 to 1 into 40 equal parts to obtain the equal-divided displacement value: s gf =linspace(0,1,40), where linspace means 40 equal divisions between 0, 1, and 40, such as the equal division calculation instruction function in the MATLAB programming language, which obtains a 40-equally divided displacement value sequence from 0 to 1;

[0153] S322, according to the equally divided displacement value s gf , the interpolation method is used in the upstroke to obtain the number of interpolation points n sm1 =interp1[s g (1:jm ),1:j m ,s gf ], where interp1 represents interpolation calculation, such as the interpolation function in the MATLAB programming language, and the corresponding number of displacement points is obtained after taking the integer, that is, n sm =fix(n sm1 ), where fix represents a rounding operation, such as the rounding function in the MATLAB programming language, to obtain the corresponding normalized upstroke load: f gs =[f g (n sm )];

[0154] S323, divide the displacement value s into equal parts gf Arrange in reverse order, and use interpolation method to get the number of interpolation points n in the downstroke xm1 =interp1[s g (j m :end),j m :N,fliplr(s gf )], where fliplr represents the inversion of an array, such as the inversion function in the MATLAB programming language, which takes an integer to get the corresponding number of points of the displacement, that is, n xm =fix(n xm1 ), so as to obtain the normalized downstroke load value at the same displacement value: f gx =[f g (n xm )];

[0155] S324, make the difference to perform the first fold: f gc1 =f gs -f gx ;

[0156] S325, make a difference to perform the second folding, that is, the first 20 load values ​​of the first folding curve minus the last 20 load values: f gc2 =f gc1 (1:20)-f gc1 (21:40).

[0157] The extracted folding curve feature values ​​are implemented as follows: Figure 3 shown.

[0158] Example 4

[0159] On the basis of Example 3, S33, extracting the contour feature value, selecting a number of displacement values ​​and load values ​​at equal intervals by the interpolation method, to form the contour feature value, that is, using a number of displacement values ​​as the horizontal coordinates and a number of load values ​​as the vertical coordinates, a sparse contour indicator diagram containing most of the indicator diagram information can be obtained, specifically:

[0160] S331, construct normalized time t g =linspace(0,1,N),

[0161] S332, select 50 displacement values ​​at equal intervals by interpolation method: s gl =interp1(0,1,N);

[0162] S333. Select 50 load values ​​at equal intervals by interpolation method: f gl =interp1(t g ,f g ,t gl );

[0163] S334. A contour dynamometer diagram is obtained with 50 displacement values ​​as the horizontal axis and 50 load values ​​as the vertical axis.

[0164] The extracted contour feature values ​​are implemented as follows Figure 4 shown.

[0165] Example 5

[0166] See also Figure 5 Based on the above embodiment, this solution proposes a pumping unit continuous indicator diagram dynamic characteristic system for implementing the above method, including:

[0167] The dynamometer diagram acquisition module obtains the dynamometer diagram at the current moment;

[0168] The indicator diagram preprocessing module preprocesses the indicator diagram at the current moment;

[0169] The eigenvalue management module of the indicator diagram provides the optional eigenvalue extraction types and eigenvalue storage methods, interacts with the user, and receives the user's selection;

[0170] The dynamometer diagram feature value extraction module extracts features from the preprocessed dynamometer diagram at the current moment according to the feature value type selected by the user;

[0171] The module for judging the characteristic value of the indicator diagram and dynamically storing the characteristic value judges the characteristic value of the indicator diagram at the current moment and the storage requirement selected by the user and dynamically stores the characteristic value;

[0172] The dynamometer diagram characteristic value display module displays the characteristic value of the dynamometer diagram at the current moment.

[0173] The dynamometer diagram acquisition module receives and accesses the suspension point displacement measurement sequence and load measurement sequence of two stroke cycles, records the access time of the data as time ti, selects the suspension point displacement sequence and load sequence of one stroke cycle according to the change law of the suspension point displacement, and obtains a complete dynamometer diagram;

[0174] The dynamometer diagram preprocessing module 2 performs smoothing and noise removal processing, normalization processing, and calculation of the second-order derivative of the load sequence on the obtained suspension point displacement measurement sequence and load measurement sequence;

[0175] The dynamometer diagram characteristic value management module provides optional characteristic value extraction types and characteristic value storage methods, interacts with the user, and receives the type of characteristic value extraction and characteristic value storage method selected by the user;

[0176] Among them, the types of feature value extraction provided to the user include: folding curve feature values ​​and contour feature values. The user can choose one or all, while the geometric feature values ​​must be calculated and are not within the selection range; the feature value storage methods provided to the user include: comparing and storing with the feature values ​​of historical moment 1, comparing and storing with the feature values ​​of historical moment 2, and comparing and storing with the feature values ​​of historical moment 3. Among them, historical moment 1, historical moment 2, and historical moment 3 are represented by ti-1 moment for convenience.

[0177] The dynamometer diagram eigenvalue extraction module calculates and extracts geometric eigenvalues, folding curve eigenvalues ​​or contour eigenvalues ​​according to the eigenvalue types determined by the dynamometer diagram eigenvalue management module;

[0178] The eigenvalue judgment and dynamic storage module of the indicator diagram reads the eigenvalue at time ti-1 from the dynamic eigenvalue database according to the historical time ti-1 proposed by the user, calculates the change rate between the geometric eigenvalues ​​at time ti and time ti-1, and when the maximum change rate is greater than 5%, stores the extracted eigenvalue and time mark ti in the dynamic feature database; when the maximum change rate is less than 5%, does not save the eigenvalue, transfers to the indicator diagram acquisition module, and enters the next cycle;

[0179] The dynamometer diagram characteristic value display module compares and displays the geometric characteristic values ​​at time ti and time ti-1 in the form of a bar graph, and displays the folding curve characteristic value or the contour characteristic value in a graphical manner.

[0180] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for extracting dynamic features of a continuous indicator diagram of an oil pumping unit, characterized in that: Including steps, S1, obtain the current moment indicator diagram; S2, pre-processing the current moment indicator diagram; S3, extracting the characteristic value of the current indicator diagram; S4, judging and dynamically storing the characteristic value at the current moment; Among them, in said S3, the characteristic value of the current indicator diagram is extracted as follows: S31, extracting geometric characteristic values, wherein the geometric characteristic values ​​include upstroke area, downstroke area, maximum load position percentage, minimum load position percentage, minimum peak position percentage of the second-order derivative of the load upstroke, maximum peak position percentage of the second-order derivative of the load downstroke, normalized starting value of the load, normalized top dead center value of the load, maximum peak-to-peak value of the detrended fluctuation in the load reduction stage, maximum peak position percentage of the detrended peak in the load reduction stage, and normalized area; S32, extracting the characteristic value of the folding curve, dividing the normalized dynamometer diagram into segments, performing difference according to the displacement correspondence in a certain manner, and obtaining a difference curve, wherein the difference curve contains information of the difference curve, thereby achieving data compression; S33, extracting contour characteristic values, selecting a number of equally divided displacement values ​​and load values ​​at equal intervals by an interpolation method, forming contour characteristic values, that is, taking a number of displacement values ​​as abscissas and a number of load values ​​as ordinates, obtaining a contour indicator diagram containing absolute indicator diagram information; In S4, the current characteristic value is judged and dynamically stored as follows: S41, according to the selected historical moment selected by the user, reading the feature value of the required historical moment, that is, the moment ti-1, from the dynamic feature database; S42, calculate the change rate of the geometric eigenvalue at the current time ti and the geometric eigenvalue at the historical time ti-1, and select the one with the largest change rate. When its change rate is greater than or equal to 5%, that is, When the extracted feature value is stored in the dynamic feature database with time ti as the mark, C d is the geometric eigenvalue extracted at the current time ti, C l is the geometric eigenvalue extracted at the historical moment ti-1; when the change rate is less than 5%, that is, When , the feature value is not stored and the process goes to step S1.

2. The method for extracting dynamic features of a continuous indicator diagram of an oil pumping unit according to claim 1, characterized in that: In S1, the current moment indicator diagram is obtained as follows: Step S11, according to the pumping unit stroke period T, cache the data collected by the dynamometer of two pumping unit stroke periods T, and mark it as the current time ti; Step S12, collecting data from the cached dynamometer to obtain the suspension point displacement sequence and the corresponding suspension point load sequence, and obtaining the dynamometer diagram at time ti with the displacement as the abscissa and the load as the ordinate; The suspension point displacement sequence s = [s(n)], and the corresponding suspension point load sequence f = [f(n)], where n = 1, 2, ..., N, N is the total number of sampling points.

3. The method for extracting dynamic features of a continuous indicator diagram of an oil pumping unit according to claim 2, characterized in that: In S2, the current moment indicator diagram is preprocessed as follows: S21, removing noise interference from the suspension point displacement sequence s and the suspension point load sequence f; S22, normalize the suspension point displacement sequence s and the suspension point load sequence f, and obtain the normalized displacement sequence: The normalized suspension point load sequence is, S23. Calculate the second-order derivative of the suspension point load, that is, the second-order gradient: f″=gradient(f′), f″=gradient(f′), gradient represents the solution gradient.

4. The method for extracting dynamic features of a continuous dynamometer diagram of an oil pumping unit according to claim 3, characterized in that: The step S31, extracting geometric eigenvalues, specifically includes: (1) The upstroke area is, Among them, j m is the coordinate point number when the suspension point is displaced to the upper dead center, that is, [s m , j m ] = max(s); (2) The downstroke area is, (3) The percentage of the maximum load position is, P bm =s(j pm ) / s(j m )×100%; Among them, [f m , j pm ] = max(f); (4) The percentage of the minimum load position is, P bn =100-s(j pn ) / s(j m )×100%; Among them, [f n , j pn ]=min(f);f n is the minimum value of signal f, j pn is the coordinate point number where the minimum value is located; (5) The percentage of the minimum peak position of the second-order derivative of the load is, P ds =s(j dpn ) / s(j m )×100%, where j dpn is the number of sampling points at the minimum peak of the second-order derivative of the load; The specific steps include: Step 1: Find the negative second-order derivative of the upthrust load, i.e. -f″(1:j m ) and its sampling points, that is, [f pn , j pn ]=findpeaks[-f″(1:j m )], findpeaks means finding peaks, f pn Indicates -f″(1:j m ) in all peak values; Step 2: Get f pn The maximum peak value and its coordinate points in [f pnm , j pnm ]=max(f pn ), where f pnm f pn The maximum peak value in j pnm Indicates the maximum peak value f pn The number of coordinate points in Step 3: Obtain the number of sampling points for the minimum peak value of the load second-order derivative, i.e., j dpn =j pn (j pnm ); (6) The maximum peak position percentage of the load second-order derivative undershoot is, P dx =100-s(j dpm ) / s(j m )×100%; Among them, j dpm is the sampling point at the maximum peak position of the load second-order derivative undershoot. The specific calculation steps are as follows: Step 1: Find the second-order derivative of the downstroke load, i.e. f″(j m :N) and its sampling points, that is, [f m , j pm ] = findpeaks[f″(j m :N)]; where f m represents f″(j m :N) total peak value,j pm Indicates the coordinate point number where the peak value is located; Step 2: Get f pm The maximum peak value and its coordinate points in [f pmm , j pmm ]=max(f pm ); Step 3: Obtain the number of sampling points for the minimum peak value of the second-order derivative of the load, i.e., j dpm =j pm (j pmm )+j m -1; (7) The normalized starting value of the load is, f gq =f g (1)×100%, f g represents the normalized loading; (8) The normalized top dead center value of the load is, f gs =f g (j m )×100%; (9) The maximum peak-to-peak value of the detrended fluctuation during the load reduction phase is f ji ;f ji The specific steps to obtain are: Step 1: Calculate the trend line from the top dead center to the maximum peak of the second-order derivative of the load, that is, f qu =k qu ×s g (j m :j dpm )+b qu ; Among them, k qu represents the slope of the curve, k qu =[f g (j dpm )-f g (j m )] / [s g (j dpm )-s g (j m )],b qu represents the intercept of the curve, b qu =k qu ×s g (j m )-f g (j m );s g (j m :j dpm ) represents the number of sampling points j m to dpm The normalized displacement of Step 2: Calculate the load shedding fluctuation curve, i.e. f bo =f g (j m :j dpm )-f qu ; Step 3: Find the peak value in the fluctuation curve and its position coordinate points, that is, [f bq , j bq ]=findpeaks(|f bo |);f dq It means |f bo The peak value of | bq Indicates the coordinate point number where the peak value is located; Step 4: Obtain the coordinate points of the maximum peak position, i.e. [f jian , j bpm ]=max(f bq ); Step 5: Get the maximum peak-to-peak value, i.e. f ji =f bo (j bp (j bpm ))×100%; (10), the percentage of the maximum peak position of the detrended state in the load reduction stage is, p ji =100-s g (j bp (j bpm ))×100%; (11), the normalized area is, 5. The method for extracting dynamic features of a continuous indicator diagram of an oil pumping unit according to claim 4, characterized in that: The S32, extracting the characteristic value of the folding curve, dividing the normalized dynamometer diagram into segments, performing difference according to the displacement correspondence in a certain manner, and obtaining a difference curve, wherein the difference curve contains information of the difference curve, thereby achieving data compression, specifically: S321, divide the normalized upstroke displacement from 0 to 1 into 40 equal parts to obtain the equal-divided displacement value: s gf =linspace(0,1,40), where linspace means 40 equal divisions between 0,1,40; S322, according to the equally divided displacement value s gf , the interpolation method is used in the upstroke to obtain the number of interpolation points n sm1 =interp1[s g (1:j m ), 1:j m ,s gf ], where interp1 represents interpolation calculation; S323, divide the displacement value s into equal parts gf Arrange in reverse order, and use interpolation method to get the number of interpolation points n in the downstroke xm1 =interp1[s g (j m :end),j m :N,fliplr(s gf )], where fliplr represents the inversion of an array; S324, make the difference to perform the first fold: f gc1 =f gs -f gx ; S325, make a difference to perform the second folding, that is, the first 20 load values ​​of the first folding curve minus the last 20 load values: f gc2 =f gc1 (1:20)-f gc1 (21:40).

6. The method for extracting dynamic features of a continuous indicator diagram of an oil pumping unit according to claim 5, characterized in that: The S33, extracting the contour characteristic value, selecting a number of displacement values ​​and load values ​​at equal intervals by the interpolation method, to form the contour characteristic value, that is, using a number of displacement values ​​as the horizontal coordinates and a number of load values ​​as the vertical coordinates to obtain a sparse contour indicator diagram that contains most of the indicator diagram information, specifically: S331, construct normalized time t g =linspace(0,1,N), S332, select 50 displacement values ​​at equal intervals by interpolation method: s gl = interp1(0, 1, N); S333, select 50 load values ​​at equal intervals by interpolation method: fg l= interp1(t g , f g , tg l ); S334. A contour dynamometer diagram is obtained with 50 displacement values ​​as the horizontal axis and 50 load values ​​as the vertical axis.

7. A pumping unit continuous indicator diagram dynamic characteristic system for implementing the method described in claim 6, characterized in that: include: The dynamometer diagram acquisition module obtains the dynamometer diagram at the current moment, specifically: accepting and accessing the suspension point displacement measurement sequence and load measurement sequence of two stroke cycles, recording the access time of the data as the moment ti, and selecting the suspension point displacement sequence and load sequence of one stroke cycle according to the change law of the suspension point displacement to obtain a complete dynamometer diagram; The dynamometer diagram preprocessing module preprocesses the dynamometer diagram at the current moment, specifically: smoothing and denoising the obtained suspension point displacement measurement sequence and load measurement sequence, normalizing the sequence, and calculating the second-order derivative of the load sequence; The dynamometer diagram characteristic value management module provides the selected characteristic value extraction type and characteristic value storage method, interacts with the user, and receives the type of characteristic value extraction and characteristic value storage method selected by the user; The dynamometer diagram feature value extraction module performs feature extraction on the preprocessed dynamometer diagram at the current moment according to the feature value type selected by the user, specifically: according to the feature value type determined by the dynamometer diagram feature value management module, calculates and extracts geometric feature values, folding curve feature values ​​or contour feature values; The eigenvalue judgment and dynamic storage module of the indicator diagram judges the eigenvalue of the indicator diagram at the current moment and the storage requirement selected by the user and dynamically stores the eigenvalue, specifically: according to the historical moment ti-1 proposed by the user, the eigenvalue at the moment ti-1 is read from the dynamic eigenvalue database, and the change rate between the geometric eigenvalues ​​at the moment ti and the moment ti-1 is calculated. When the maximum change rate is greater than 5%, the extracted eigenvalue and the time mark ti are stored in the dynamic feature database. When the maximum change rate is less than 5%, the eigenvalue is not saved, and the module is transferred to the indicator diagram acquisition module to enter the next cycle; The dynamometer characteristic value display module displays the characteristic value of the dynamometer at the current moment, specifically: The geometrical eigenvalues ​​at time ti and time ti-1 are compared and displayed in the form of a bar graph, and the folding curve eigenvalues ​​or contour eigenvalues ​​are displayed in a graphical manner.