A method for diagnosing the working condition of pumping wells based on multi-domain feature fusion of electrical power diagrams
Through the feature extraction method combined with wavelet transformation and Zernike moment, combined with a fully connected neural network, a 4-S electric power diagram of the oil pump is generated, which solves the problem of incomplete feature extraction in the well condition diagnosis of oil pump, improves the accuracy and adaptability of operating conditions and reduces system costs.
Patent Information
- Application Number
- CN202510916132.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-07-03
AI Technical Summary
The prior art has problems such as high system cost, limited diagnostic range, single feature extraction methods, weak ability to distinguish complex images, high redundant dimensions and poor fusion expression in the diagnosis of oil pump wells, resulting in insufficient diagnostic accuracy and adaptability.
The feature extraction method of wavelet transformation and Zernike moment combined with a fully connected neural network is used to extract the multi-domain features of the electric power diagram of the oil pump well through the fusion of time-frequency domain and spatial domain features, and generate the 4-S electric power diagram of the oil pump for working condition diagnosis.
It improves the accuracy and recognition ability of working condition diagnosis, reduces the cost of system research and development, breaks through the technical bottleneck of traditional working condition recognition, and has good promotion and application value.
Smart Images

Figure CN120408473B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pumping well operating condition diagnosis, and in particular to a pumping well operating condition diagnosis method based on multi-domain feature fusion of an electric power diagram. Background Art
[0002] The working condition diagnosis of pumping wells mainly relies on the dynamometer diagram. The use of the dynamometer diagram for diagnosis has the advantages of being simple, reliable, and intuitive. However, there are still significant limitations: (1) High system cost: The acquisition of the dynamometer diagram relies on dedicated load and displacement sensors. The installation position of such sensors must be precise. The debugging and operation and maintenance process is cumbersome and requires professional personnel to implement, which leads to increased production costs. (2) Limited diagnostic scope: The dynamometer diagram mainly reflects the working condition of the pumping well equipment. It is difficult to accurately reflect the operating status of the well surface equipment. In addition, it is impossible to obtain effective dynamometer diagram information under special environments and well conditions.
[0003] In recent years, researchers have gradually adopted electric power diagrams for pumping well operating condition diagnosis. Compared with indicator diagrams, electric power diagrams are simpler to collect and have lower costs. Electric power diagram operating condition recognition technology has achieved some results in pumping well production, but there are still some limitations: (1) Single feature extraction method: Most feature extraction methods only focus on the single feature type of electric power diagram image, while ignoring the feature information of the one-dimensional signal of the pumping unit. Although some methods use one-dimensional signals as input to extract time domain or frequency domain feature information, they still cannot simultaneously express the multi-scale feature information of the signal in the time domain and frequency domain, nor can they accurately express complex signal changes. (2) Weak ability to distinguish complex patterns of images: Most methods directly extract features from the original power-displacement electric power diagram, but the original power-displacement electric power diagram has problems such as missing time information, difficulty in confirming the upper and lower dead points corresponding to the displacement, and information sparsity and weakening of local features. It cannot effectively express the fine-grained information such as edge patterns and frequency responses hidden in the image, which limits the accuracy and generalization ability of fault type recognition. (3) High redundant dimension and poor fusion expression: Most of the current electrical power diagram feature fusion methods use feature splicing or simple superposition to directly merge feature vectors from different sources and input them into the classification model. They lack redundancy suppression and feature compression mechanisms, resulting in a high dimension of the final fusion features and an inability to fully explore the complementarity of multi-source information. This makes the diagnostic method insufficient in adaptability and robustness, and it is difficult to adapt to changes in working conditions under actual complex well conditions.
[0004] Therefore, how to mine the large amount of fault information in the electrical power diagram, more accurately and comprehensively extract the key points of the working condition type characteristics, and effectively improve the accuracy of working condition diagnosis is a technical problem that needs to be solved urgently. Summary of the Invention
[0005] The present invention provides a method for diagnosing the working condition of a pumping well based on the fusion of multi-domain features of an electric power diagram, aiming to solve at least one of the above-mentioned technical problems.
[0006] To achieve the above object, the present invention provides a method for diagnosing the working condition of a pumping well based on multi-domain feature fusion of an electric power diagram, comprising the following steps:
[0007] S1: Obtain the measured active power and polished rod displacement data of the target pumping unit;
[0008] S2: extracting time-frequency domain features of the active power of the electric power diagram measured by the target pumping unit using wavelet transform to obtain a time-frequency domain feature vector;
[0009] S3: generating a pumping unit power-displacement electric work diagram based on the electric work diagram active power and the polished rod displacement data, and converting the pumping unit power-displacement electric work diagram into a pumping unit 4-S electric work diagram;
[0010] The pumping unit power-displacement electric work diagram is configured as an image with the ordinate being active power and the abscissa being polished rod displacement; the pumping unit 4-S electric work diagram is configured as an image with the ordinate being active power and the abscissa being the time corresponding to each active power;
[0011] S4: The spatial domain features of the 4-S electrical power diagram of the pumping unit are extracted using the wavelet transform-Zernike moment combined feature extraction method to obtain the spatial domain feature vector;
[0012] S5: Based on the time-frequency domain feature vector and the space domain feature vector, a weighted feature fusion method is used to synthesize a working condition diagnosis feature vector, and a fully connected neural network pumping unit electrical power diagram working condition diagnosis model is established using the synthesized working condition diagnosis feature vector;
[0013] S6: Utilizing the established pumping unit electrical power diagram operating condition diagnosis model, perform pumping unit operating condition diagnosis.
[0014] Optionally, step S1 specifically includes:
[0015] S11: using a power acquisition module installed on the target pumping unit to collect an active power signal of the electric power diagram, and processing the collected active power signal of the electric power diagram to obtain the active power of the electric power diagram;
[0016] S12: Using an LVDT sensor installed on one side of the polished rod of the target pumping unit, the polished rod displacement data of the target pumping unit is collected.
[0017] Optionally, step S2 specifically includes:
[0018] S21: using discrete wavelet transform, the active power of the electric power diagram measured by the target pumping unit is decomposed into signals of different resolution levels through a low-pass filter LP and a high-pass filter HP;
[0019] S22: Extracting the time-frequency domain characteristics of the active power of the electric power diagram measured by the target pumping unit to obtain a time-frequency domain feature vector; wherein the time-frequency domain characteristics include the sub-band energy size of different coefficients, the discrete degree of the signal energy distribution, and the energy proportion of each frequency sub-band in the entire signal.
[0020] Optionally, the expression of step S21 is specifically:
[0021]
[0022] in, Indicates the number of decomposition layers, 1, 2, 3, 4, is the approximate coefficient, is the detail coefficient, represents the discrete point location, represents low-pass filter LP downsampling, Represents high-pass filter HP downsampling, Indicates the The value of the approximate coefficient obtained by layer decomposition at position n, Indicates the The value of the detail coefficient at position n obtained by layer decomposition.
[0023] Optionally, the expression of step S22 is specifically:
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031] in, is the time-frequency domain eigenvector, Represents detail coefficient The sub-band energy eigenvector, which measures the discreteness of the signal energy distribution, is defined as the wavelet distribution entropy. is the detail coefficient The wavelet distribution entropy eigenvector, the energy ratio of each frequency sub-band in the entire signal is defined as the frequency band energy weight, Represents detail coefficient The frequency band energy weight feature vector, represents the total energy, and N represents the number of coefficients.
[0032] Optionally, step S3 specifically includes:
[0033] S31: normalizing the collected active power of the electric power diagram and the polished rod displacement data;
[0034] S32: using the normalized active power of the electric work diagram and the polished rod displacement data, establishing a pumping unit power-displacement electric work diagram with the ordinate being active power and the abscissa being polished rod displacement;
[0035] S33: sampling the upstroke power and downstroke power in the pumping unit power-displacement electric work diagram by interpolation method to obtain a pumping unit 4-S electric work diagram with the ordinate being active power and the abscissa being the time corresponding to each active power.
[0036] Optionally, step S4 specifically includes:
[0037] S41: Using discrete wavelet transform to enhance the spatial domain characteristics of the 4-S electrical power diagram of the pumping unit;
[0038] S42: Using Zernike moments to extract spatial domain features from the enhanced 4-S electrical power diagram image of the pumping unit, a spatial domain feature vector is obtained.
[0039] Optionally, step S41 specifically includes:
[0040] S411: Use Daubechies-4 wavelet basis function to analyze the image of 4-S electric power diagram of oil pumping unit Perform two-dimensional wavelet transform, the expression is:
[0041]
[0042] S412: Repeat the wavelet decomposition in step S411 to decompose the electric power diagram image of the pumping unit 4-S into multiple low-frequency coefficients and high-frequency coefficients;
[0043] S413: A weighted average method is applied to the multiple low-frequency coefficients obtained after decomposition, and an enhancement process is applied to the multiple high-frequency coefficients obtained after decomposition. The expression is:
[0044]
[0045] in, represents the fused low-frequency coefficients, and Represents the low-frequency coefficients of the same decomposition layer;
[0046]
[0047] Among them, take , is the high frequency coefficient in each direction, is the enhanced high frequency coefficient;
[0048] S414: Reconstruct the image of the 4-S electric power diagram of the oil pumping unit by using inverse wavelet transform to process the processed low-frequency coefficients and high-frequency coefficients , the expression is:
[0049]
[0050] in, ; is a random starting scale; and is relative to The offset of is a discrete function, and is a discrete variable; and Indicates the size of the image; and is a two-dimensional wavelet function; represents the low-frequency coefficient after decomposition, Represents the high-frequency coefficients in different directions after decomposition, Represents the high-frequency coefficients of the image in the horizontal, vertical, and diagonal directions respectively.
[0051] Optionally, step S42 specifically includes:
[0052] S421: Calculate the centroid position of the image of the electric power diagram of the pumping unit 4-S and translate it to the coordinate origin;
[0053] S422: Map each pixel position in the image of the 4-S electrical power diagram of the pumping unit to the unit circle. The expression is:
[0054]
[0055] in, Indicates a point The length of the vector to the origin, Represents a vector The angle between the axis and the horizontal axis;
[0056] S423: Use Zernike moments to extract spatial domain features. The expression is:
[0057]
[0058]
[0059]
[0060]
[0061] in, represents the final spatial domain eigenvector extracted by Zernike moments, represents the calculation result of Zernike moment, Indicates different polynomial orders , Angle times The Zernike moment modulus is calculated. Represents the summation variable, which is used to expand the calculation of each term in the polynomial. represents the Zernike basis function, is an imaginary unit, represents a radial polynomial;
[0062] S424: Select end n=4, extract the spatial domain features of the 4-S electrical power diagram of the pumping unit, and form a spatial domain feature vector .
[0063] Optionally, in step S5, the expression of the synthetic working condition diagnosis feature vector is specifically:
[0064]
[0065] in, is the fused feature vector, is the weight coefficient.
[0066] The beneficial effects of the present invention are:
[0067] (1) A method for diagnosing the working condition of a pumping unit well based on the fusion of multi-domain features of the electric power diagram is proposed. The discrete wavelet transform is used to extract the time-frequency domain features of the active power signal of the electric power diagram of the pumping unit. This method overcomes the shortcomings of traditional electric power diagram feature extraction methods, such as the inability to mine a large amount of fault information in the active power signal of the electric power diagram, the inability to simultaneously express the multi-scale feature information of the signal in the time and frequency domains, and the inability to accurately express complex signal changes.
[0068] (2) By converting the pumping unit power-displacement electrical work diagram into the time domain to generate the pumping unit 4-S electrical work diagram and using discrete wavelet transform to enhance the spatial domain features of the pumping unit 4-S electrical work diagram, the problems of local weak edges, vibration fluctuations and other information in the image being easily ignored and the low image extraction rate are solved, the utilization rate of feature information is improved, and the accuracy of pumping unit well working condition diagnosis is improved.
[0069] (3) A wavelet transform-Zernike moment joint method is proposed to extract the spatial domain feature vector of the 4-S electrical power diagram of the pumping unit, and then the time-frequency domain and spatial domain of the electrical power diagram are fused using a weighted feature fusion method. This solves the problems of high redundant dimension of feature information and poor fusion expression, enriches the multi-domain feature extraction method, improves the accuracy of working condition identification, and breaks through the technical bottleneck of traditional working condition identification. It has strong engineering practicality, low system R&D cost, and is a method for pumping unit well working condition diagnosis based on multi-domain feature fusion of electrical power diagram with good promotion and application value. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 Schematic diagram of the process of the method for diagnosing the working condition of a pumping well based on the fusion of multi-domain features of an electric power diagram according to an embodiment of the present invention;
[0071] Figure 2 The displacement-power electric work diagram of the pumping unit constructed by the pumping unit well working condition diagnosis method based on the multi-domain feature fusion of the electric work diagram in the embodiment of the present invention;
[0072] Figure 3 This is a 4-S electrical power diagram of a pumping unit constructed according to the method for diagnosing the working condition of a pumping unit well based on the fusion of multi-domain features of the electrical power diagram in an embodiment of the present invention. DETAILED DESCRIPTION
[0073] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0074] The embodiment of the present invention provides a method for diagnosing the working condition of a pumping well based on the fusion of multi-domain features of an electric power diagram. Figure 1 , Figure 1 The figure is a flow chart of a method for diagnosing the working condition of a pumping well based on the fusion of multi-domain features of an electric power diagram according to an embodiment of the present invention.
[0075] In this embodiment, a method for diagnosing the working condition of a pumping well based on multi-domain feature fusion of an electric power diagram includes the following steps:
[0076] S1: Obtain the measured active power and polished rod displacement data of the target pumping unit;
[0077] S2: extracting time-frequency domain features of the active power of the electric power diagram measured by the target pumping unit using wavelet transform to obtain a time-frequency domain feature vector;
[0078] S3: generating a pumping unit power-displacement electric work diagram based on the electric work diagram active power and the polished rod displacement data, and converting the pumping unit power-displacement electric work diagram into a pumping unit 4-S electric work diagram;
[0079] The pumping unit power-displacement electric work diagram is configured as an image with the ordinate being active power and the abscissa being polished rod displacement; the pumping unit 4-S electric work diagram is configured as an image with the ordinate being active power and the abscissa being the time corresponding to each active power;
[0080] S4: The spatial domain features of the 4-S electrical power diagram of the pumping unit are extracted using the wavelet transform-Zernike moment combined feature extraction method to obtain the spatial domain feature vector;
[0081] S5: Based on the time-frequency domain feature vector and the space domain feature vector, a weighted feature fusion method is used to synthesize a working condition diagnosis feature vector, and a fully connected neural network pumping unit electrical power diagram working condition diagnosis model is established using the synthesized working condition diagnosis feature vector;
[0082] S6: Utilizing the established pumping unit electrical power diagram operating condition diagnosis model, perform pumping unit operating condition diagnosis.
[0083] It should be noted that existing methods for extracting fault information features are still relatively simplistic. Most focus solely on the image features of the power diagram, while ignoring the various characteristic information inherent in one-dimensional signals. This leaves a wealth of fault information remaining unexcavated within the power diagram. Existing methods often directly extract features from the raw power-displacement power diagram. However, raw displacement-power diagrams suffer from missing time information and difficulty identifying the corresponding upper and lower dead points of displacement. Furthermore, localized information such as weak edges, vibration fluctuations, and glitches in the raw power-displacement diagrams can be easily obscured or ignored, resulting in unstable feature extraction and low operating condition identification accuracy. Therefore, processing the raw power-displacement power diagrams before extracting features is crucial for more accurate and comprehensive extraction of operating condition characteristics. Existing methods typically extract features from a single domain for operating condition diagnosis. However, the operating conditions of pumping wells vary greatly, reflected in multiple domains, including time-frequency and spatial domains. Some diagnostic methods extract features from multiple domains but simply concatenate these features for operating condition diagnosis. This reduces feature utilization, increases information redundancy, and compromises diagnostic accuracy. Therefore, how to extract and fuse multi-domain features is the key to effectively improving the accuracy of working condition diagnosis.
[0084] In order to solve the above problems, this embodiment uses discrete wavelet transform to extract the time-frequency domain features of the active power signal of the electric work diagram of the oil pumping unit, generates a 4-S electric work diagram of the oil pumping unit by converting the power-displacement electric work diagram of the oil pumping unit into the time domain, and uses discrete wavelet transform to enhance the spatial domain features of the 4-S electric work diagram of the oil pumping unit, and uses the weight feature fusion method to fuse the time-frequency domain and spatial domain of the electric work diagram, which solves the problems that the traditional electric work diagram feature extraction method has not yet mined a large amount of fault information in the active power signal of the electric work diagram, cannot simultaneously express the multi-scale feature information of the signal in the time domain and frequency domain, and cannot accurately represent the electric work diagram. It overcomes the shortcomings of complex signal changes, solves the problems of local weak edges, vibration fluctuations and other information in the image being easily ignored and the low image extraction rate, improves the utilization rate of feature information, and improves the accuracy of pumping well working condition diagnosis. At the same time, it can also solve the problems of high redundant dimension of feature information and poor fusion expression, enriches the multi-domain feature extraction method, improves the accuracy of working condition identification, breaks through the technical bottleneck of traditional working condition identification, has strong engineering practicality, low system R&D cost, and has good promotion and application value. It is a pumping well working condition diagnosis method based on multi-domain feature fusion of electric power diagram.
[0085] To explain the present invention more clearly, a specific example of the method for diagnosing the working condition of a pumping well based on the fusion of multi-domain features of an electric power diagram is provided below, which includes the following implementation steps:
[0086] Step 1: Obtain the measured active power signal of the pumping unit electrical diagram and the polished rod displacement data, process the obtained active power signal of the pumping unit, and store the obtained active power data of the pumping unit electrical diagram and the polished rod displacement data together.
[0087] Step 2: Use wavelet transform to extract the time-frequency domain features of the active power signal of the pumping unit electrical power diagram to obtain the time-frequency domain feature vector .
[0088] Step 3: Use the stored data for normalization and plot a pumping unit power-displacement electrical work diagram. This diagram is then converted into a four-stage (4-S) electrical work diagram. The pumping unit power-displacement electrical work diagram is plotted with active power as the ordinate and polished rod displacement as the abscissa. The four-stage (4-S) electrical work diagram is a four-stage diagram with active power as the ordinate and the time corresponding to each active power as the abscissa.
[0089] Step 4: Use a wavelet transform-Zernike moment combined feature extraction method to extract the spatial domain feature information of the 4-S electrical power diagram of the pumping unit and obtain the spatial domain feature vector .
[0090] Step 5: The time-frequency domain feature vector obtained in step 2 And the spatial domain feature vector obtained in step 4 Use weighted feature fusion method to fuse into working condition diagnosis feature vector , a pumping unit electrical power diagram operating condition diagnosis model based on multi-domain feature fusion and fully connected neural network is established.
[0091] In a preferred embodiment, in step 1, a power acquisition module installed on the pumping unit is used to obtain the active power signal of the pumping unit's electrical work diagram, and after processing, the active power data of the pumping unit's electrical work diagram is obtained. The polished rod displacement data is obtained using an LVDT sensor installed on one side of the polished rod of the pumping unit.
[0092] In a preferred embodiment, in step 2, wavelet transform is used to extract the time-frequency domain features of the active power signal of the pumping unit electrical work diagram. The core concept of wavelet transform is to decompose the signal into a series of wavelet functions of different scales and frequencies. Wavelet transform refers to the scaling and translation transformation of wavelet functions, as shown in formula 1.1:
[0093] (1.1)
[0094] in, is the expansion factor, is the translation factor, is a wavelet function.
[0095] For the signal The continuous wavelet transform (CWT) is as shown in formula 1.2:
[0096] (1.2)
[0097] The discrete wavelet is and Two continuous factors are discretized, as shown in formula 1.3:
[0098] (1.3)
[0099] in, .
[0100] The corresponding discrete wavelet expression is as shown in formula 1.4:
[0101] (1.4)
[0102] For the signal The discrete wavelet transform (DWT) is as shown in Formula 1.5.
[0103] (1.5)
[0104] in, is the complex conjugate of the wavelet function.
[0105] Considering that the active power signal of the pumping unit electrical work diagram is a discrete digital signal, and the pumping unit working site has strict requirements on real-time fault warning and delay processing, and the continuous wavelet transform has high computational complexity and is difficult to process online, this patent uses discrete wavelet transform to extract the time-frequency domain characteristics of the active power signal of the pumping unit electrical work diagram. and Qualcomm The filter decomposes the active power signal of the pumping unit electrical power diagram into other signals with different resolution levels. is further divided into coefficients and , until the specified decomposition level is reached. The decomposition formula of discrete wavelet transform is as shown in 1.6:
[0106] (1.6)
[0107] in, (1,2,3,4) represents the number of decomposition layers, is the approximate coefficient, is the detail coefficient.
[0108] Since the active power signal of the pumping unit electrical power diagram exhibits significant periodicity and non-stationary characteristics, and the mutation signal occurs in different frequency bands, this experiment uses the Daubechies-4 (db4) wavelet basis to perform four-layer discrete wavelet decomposition, and obtains a coefficient set such as 1.7:
[0109] (1.7)
[0110] The calculation formula for the sub-band energy of different coefficients is as shown in 1.8:
[0111] (1.8)
[0112] Where N represents the number of coefficients. Based on the fact that detail coefficients can better reflect transient fault signals and reduce information redundancy, the detail coefficients are calculated by formula 1.8. The subband energy eigenvector of .
[0113] The degree of discreteness of signal energy distribution is defined as wavelet distribution entropy, and the calculation formula is as shown in 1.9:
[0114] (1.9)
[0115] The detail coefficient is calculated by formula 1.9 The wavelet distribution entropy eigenvector of
[0116] The energy ratio of each frequency sub-band in the entire signal is defined as the frequency band energy weight, which is calculated as shown in 1.10:
[0117] (1.10)
[0118] in, Represents the total energy.
[0119] The detail coefficient is calculated by formula 1.10 The frequency band energy weight eigenvector .
[0120] Finally, the time-frequency domain feature vector is obtained .
[0121] Therefore, the present invention uses discrete wavelet transform to extract time-frequency domain features from the active power signal of the electric power diagram, solving the problem of lack of one-dimensional signal feature information and non-stationarity of the active power signal of the electric power diagram in working condition diagnosis. The electric power signal collected on site is often accompanied by a large amount of random noise. Wavelet decomposition naturally has a certain noise suppression ability. For example, if only – and The discrete wavelet transform (DWT) provides feature information in both the time and frequency domains, overcoming the limitations of the single-view FFT and time-domain statistics. Furthermore, the feature dimension is controllable, and after hierarchical decomposition, only a limited number of indicators (subband energy, small energy wave entropy, and frequency band energy weight) are used. This results in a low feature dimension but high information content.
[0122] In a preferred embodiment, in step 3, the pumping unit power-displacement electric work diagram is an image drawn with polished rod displacement as the abscissa and active power as the ordinate.
[0123] The electric power diagram image is drawn using Python's OpenCV library. Before drawing the electric power diagram image, the data is normalized using the mean normalization method, as shown in 1.11:
[0124] (1.11)
[0125] in, is the data after mean normalization. Is the original single data, is the minimum value among all data; is the maximum value among all the data. is the average of all data.
[0126] Then, active power is used as the vertical axis and rod displacement as the horizontal axis, and the corresponding data position is set to black (0) and the background is white (255). The corresponding pumping unit power-displacement electric work diagram is made based on the normalized data. This representation method shows the structural characteristics of the data and is also convenient for subsequent processing and analysis. However, the pumping unit power-displacement electric work diagram has the problems of missing time information and difficulty in confirming the upper and lower dead points corresponding to the displacement, which leads to a low spatial domain feature extraction rate and complex data preprocessing. Therefore, the pumping unit power-displacement electric work diagram is converted into a pumping unit 4-Stage (4-S) electric work diagram.
[0127] Calculate and analyze the power-displacement electric work diagram of the pumping unit and determine the four points A, B, C, and D. Figure 2 As shown in the red circle, the pumping unit power-displacement electric work diagram is divided into 4-S curves, S1 is (A to B), S2 is (B to C), S3 is (C to D), and S4 is (D to A). Then, according to the sampling period of the pumping unit power-displacement electric work diagram, the time corresponding to each power can be obtained, and the upstroke and downstroke power can be sampled by interpolation to obtain Figure 3 The (4-S) electrical diagram of the oil pumping unit is shown. The (4-S) electrical diagram is a 4-stage image with active power as the vertical axis and the time corresponding to each active power as the horizontal axis. It should be noted that the oil pumping unit power-displacement electrical diagram is established based on normalized data, while the oil pumping unit (4-S) electrical diagram is converted from the oil pumping unit power-displacement electrical diagram. Therefore, Figure 2 and Figure 3 The values represented by the horizontal and vertical axes are unitless values after normalization.
[0128] Therefore, the present invention converts the pumping unit power-displacement electrical diagram into a 4-Stage (4-S) electrical diagram for the pumping unit. This solves the problem that the pumping unit power-displacement electrical diagram has missing time information and that it is difficult to confirm the upper and lower dead points corresponding to the displacement. The 4-S electrical diagram for the pumping unit can more clearly display the temporal dynamic changes in the pumping process, helping to identify transient or intermittent anomalies that may not be obvious in the pumping unit power-displacement electrical diagram. The pumping unit power-displacement electrical diagram only shows the spatial scale and cannot reflect the process that changes over time. The 4-S electrical diagram for the pumping unit incorporates the time scale and can fully display the dynamic process of pumping, facilitating more accurate dynamic analysis.
[0129] In a preferred embodiment, in step 4, the time-frequency domain features of the active power signal in the pumping unit's electrical work graph can accurately represent the unit's operating status under certain fault conditions, but they still have certain limitations. Therefore, a method for extracting spatial features from the pumping unit's 4-S electrical work graph, based on a combination of wavelet transform and Zernike moments, was studied to improve the characteristic analysis of the electrical work graph.
[0130] The combined wavelet transform and Zernike moment method consists of two parts: wavelet transform and Zernike moment. Traditional methods for extracting electrical work diagram features directly extract features from the original power-displacement electrical work diagram, but local information such as weak edges and vibration fluctuations in the image is easily overlooked. To improve this situation, a discrete wavelet transform is first used to enhance the spatial domain features of the 4-S electrical work diagram of the pumping unit, creating better conditions for extracting spatial domain features of the 4-S electrical work diagram of the pumping unit. Zernike moments are then used to extract the spatial domain features of the 4-S electrical work diagram of the pumping unit.
[0131] The steps of using discrete wavelet transform to enhance the spatial domain characteristics of the 4-S electrical power diagram of the pumping unit are as follows:
[0132] (1) Using Daubechies-4 (db4) wavelet basis function, the 4-S electric power diagram image of the pumping unit Perform two-dimensional wavelet transform. The two-dimensional discrete wavelet formula is as shown in 1.12:
[0133] (1.12)
[0134] in, ; is a random starting scale, usually 0; and is relative to The offset of is a discrete function, and is a discrete variable; and Indicates the size of the image; and is a two-dimensional wavelet function; represents the low-frequency coefficient after decomposition, Represents the high-frequency coefficients in different directions after decomposition, Represents the high-frequency coefficients of the image in the horizontal, vertical, and diagonal directions respectively.
[0135] (2) Using the above method to perform two wavelet decompositions, the 4-S electrical power diagram image of the pumping unit can be decomposed into multiple low-frequency and high-frequency coefficients.
[0136] (3) Process the decomposed coefficients. The low-frequency coefficients are fused using the weighted average method, as shown in 1.13:
[0137] (1.13)
[0138] in, represents the fused low-frequency coefficients, and Represents the low-frequency coefficients of the same decomposition layer.
[0139] The high frequency coefficients are enhanced, as shown in formula 1.14:
[0140] (1.14)
[0141] Among them, select the best , is the high frequency coefficient in each direction, is the enhanced high frequency coefficient.
[0142] (4) Use the inverse wavelet transform to reconstruct the 4-S electrical power diagram image of the pumping unit using the processed low-frequency and high-frequency coefficients , the wavelet reconstruction formula is as follows:
[0143] (1.15)
[0144] The enhanced 4-S electrical power diagram image of the pumping unit Use Zernike moments to extract spatial domain features. The specific steps are as follows:
[0145] (1) Calculate the centroid position of the 4-S electrical power diagram of the pumping unit and translate the centroid position of the image to the coordinate origin.
[0146] (2) Map each pixel position in the 4-S electrical power diagram of the pumping unit to the unit circle. The mapping definition is as shown in Formula 1.16:
[0147] (1.16)
[0148] in, Indicates a point The length of the vector to the origin, Represents a vector The angle between the vertical axis and the horizontal axis.
[0149] (2) Use Zernike moments to extract spatial domain features. The definition of Zernike basis function is as shown in Equation 1.17:
[0150] (1.17)
[0151] in, is an imaginary unit, represents the polynomial order, Indicates the degree of the angle (integer). Radial polynomial The definition is as in Equation 1.18:
[0152] (1.18)
[0153] in, Represents the summation variable, which is used to expand the calculation of each term in the polynomial. The calculation formula of the Zernike moment is as shown in formula 1.19:
[0154] (1.19)
[0155] For different polynomial orders , Angle times The Zernike moment modulus , forming the final eigenvector:
[0156] (1.20)
[0157] In order to fully represent the structural detail transformation of the 4-S electrical diagram of the pumping unit, the order is selected Extract the spatial domain features of the 4-S electrical power diagram of the pumping unit and form a spatial domain feature vector such as 1.21:
[0158] (1.21)
[0159] Therefore, the present invention proposes a combined wavelet transform and Zernike moment method to extract spatial domain features from the 4-S electrical work diagram of a pumping unit. This method addresses the problem that traditional methods of electrical work diagram feature extraction often overlook information such as localized weak edges and vibration fluctuations in the image. The method first uses a discrete wavelet transform to enhance the spatial domain features of the 4-S electrical work diagram of the pumping unit, thereby creating better conditions for extracting these features. Zernike moments are then used to extract these features, resulting in more effective spatial domain features and improving the accuracy of operating condition identification.
[0160] In a preferred embodiment, in step 5, an electric power diagram working condition recognition model is integrated with multi-domain features and a fully connected neural network.
[0161] Use the weight feature fusion method to transform the time-frequency domain feature vector obtained in step 2 And the spatial domain feature vector obtained in step 4 The new feature vectors are fused into a group and used as the working condition diagnosis feature vectors.
[0162] The calculation formula for weighted feature fusion of feature vectors from different domains is as shown in 1.22:
[0163] (1.22)
[0164] in, is the fused feature vector, is the weight coefficient, and the optimal value is 0.6.
[0165] The fused feature vector is:
[0166] Taking into account the stability of the model, the simplicity of the selected structure, the high computational efficiency and the suitability for small sample industrial data scenarios, the classification model selected is a fully connected neural network. The operating condition diagnosis feature vector S is obtained by weight feature fusion as the input of the fully connected neural network, and the number of input layer nodes of the neural network is set to 12. The types of operating conditions to be diagnosed are: normal operating condition, insufficient liquid supply, pump collision, continuous pumping and spraying, and fixed valve leakage. The number of neurons in the output layer is set to 5. A single hidden layer structure is adopted, and the number of hidden layer neurons is determined to be 30 through experimental evaluation. The maximum number of iterations is set to 100, and the convergence accuracy is set to 0.00001.
[0167] Therefore, the present invention uses a weighted feature fusion method to fuse extracted time-frequency and spatial domain features, addressing the dimensionality expansion and fault information redundancy issues inherent in traditional direct feature concatenation. Different faults in pumping wells manifest differently in the time-frequency and spatial domains. Using weighted feature fusion allows for the complementarity of different fault types while effectively suppressing redundancy and improving the model's adaptability and robustness.
[0168] It should be understood that, in the description of this specification, reference to terms such as "one embodiment," "another embodiment," "other embodiments," or "first to Nth embodiments" means that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any appropriate manner in any one or more embodiments or examples.
[0169] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.
[0170] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for diagnosing the working condition of a pumping well based on the fusion of multi-domain features of an electric power diagram, characterized in that: The following steps are involved: S1: Obtain the measured active power and polished rod displacement data of the target pumping unit; S2: Using wavelet transform to extract time-frequency domain features of the active power of the electric power diagram measured by the target pumping unit to obtain a time-frequency domain feature vector; specifically including: S21: using discrete wavelet transform, the active power of the electric power diagram measured by the target pumping unit is decomposed into signals of different resolution levels through a low-pass filter LP and a high-pass filter HP; The expression is: in, Indicates the number of decomposition layers, 1, 2, 3, 4, is the approximate coefficient, is the detail coefficient, represents the discrete point location, represents low-pass filter LP downsampling, Represents high-pass filter HP downsampling, Indicates the The value of the approximate coefficient obtained by layer decomposition at position n, Indicates the The value of the detail coefficient obtained by layer decomposition at position n; S22: extracting time-frequency domain features of the active power of the electric power diagram measured by the target pumping unit to obtain a time-frequency domain feature vector; wherein the time-frequency domain features include the energy of sub-bands with different coefficients, the degree of discreteness of the signal energy distribution, and the energy proportion of each frequency sub-band in the entire signal; The expression is: in, is the time-frequency domain eigenvector, Represents detail coefficient The sub-band energy eigenvector, which measures the discreteness of the signal energy distribution, is defined as the wavelet distribution entropy. is the detail coefficient The wavelet distribution entropy eigenvector, the energy ratio of each frequency sub-band in the entire signal is defined as the frequency band energy weight, Represents detail coefficient The frequency band energy weight eigenvector, represents the total energy, and N represents the number of coefficients; S3: Based on the active power of the electric work diagram and the polished rod displacement data, generating a pumping unit power-displacement electric work diagram and converting it into a pumping unit 4-S electric work diagram; S4: A wavelet transform-Zernike moment combined feature extraction method is used to extract the spatial domain features of the 4-S electrical power diagram of the pumping unit and obtain the spatial domain feature vector; specifically, the following steps are involved: S41: Using discrete wavelet transform to enhance the spatial domain characteristics of the 4-S electrical power diagram of the pumping unit; specifically including: S411: Use Daubechies-4 wavelet basis function to analyze the image of 4-S electric power diagram of oil pumping unit Perform two-dimensional wavelet transform, the expression is: S412: Repeat the wavelet decomposition in step S411 to decompose the electric power diagram image of the pumping unit 4-S into multiple low-frequency coefficients and high-frequency coefficients; S413: A weighted average method is applied to the multiple low-frequency coefficients obtained after decomposition, and an enhancement process is applied to the multiple high-frequency coefficients obtained after decomposition. The expression is: in, represents the fused low-frequency coefficients, and Represents the low-frequency coefficients of the same decomposition layer; Among them, take , is the high frequency coefficient in each direction, is the enhanced high frequency coefficient; S414: Reconstruct the image of the 4-S electric power diagram of the oil pumping unit by using inverse wavelet transform to process the processed low-frequency coefficients and high-frequency coefficients , the expression is: ; in, ; is a random starting scale; and is relative to The offset of is a discrete function, and is a discrete variable; and Indicates the size of the image; and is a two-dimensional wavelet function; represents the low-frequency coefficient after decomposition, Represents the high-frequency coefficients in different directions after decomposition, Represents the high-frequency coefficients of the image in the horizontal, vertical, and diagonal directions respectively; S42: Using Zernike moments to extract spatial domain features from the enhanced 4-S electrical power diagram of the pumping unit to obtain spatial domain feature vectors; specifically, the following steps are included: S421: Calculate the centroid position of the image of the electric power diagram of the pumping unit 4-S and translate it to the coordinate origin; S422: Map each pixel position in the image of the 4-S electrical power diagram of the pumping unit to the unit circle. The expression is: in, Indicates a point The length of the vector to the origin, Represents a vector The angle between the axis and the horizontal axis; S423: Use Zernike moments to extract spatial domain features. The expression is: in, represents the final spatial domain eigenvector extracted by Zernike moments, represents the calculation result of Zernike moment, Indicates different polynomial orders , Angle times The Zernike moment modulus is calculated. Represents the summation variable, which is used to expand the calculation of each term in the polynomial. represents the Zernike basis function, is an imaginary unit, represents a radial polynomial; S424: Select end n=4, extract the spatial domain features of the 4-S electrical power diagram of the pumping unit, and form a spatial domain feature vector ; S5: Based on the time-frequency domain feature vector and the space domain feature vector, a weighted feature fusion method is used to synthesize a working condition diagnosis feature vector, and a fully connected neural network pumping unit electrical power diagram working condition diagnosis model is established using the synthesized working condition diagnosis feature vector; S6: Utilizing the established pumping unit electrical power diagram operating condition diagnosis model, perform pumping unit operating condition diagnosis.
2. The method for diagnosing the working condition of a pumping well based on multi-domain feature fusion of an electric power diagram according to claim 1, characterized in that: Step S1 specifically includes: S11: using a power acquisition module installed on the target pumping unit to collect an active power signal of the electric power diagram, and processing the collected active power signal of the electric power diagram to obtain the active power of the electric power diagram; S12: Using an LVDT sensor installed on one side of the polished rod of the target pumping unit, the polished rod displacement data of the target pumping unit is collected.
3. The method for diagnosing the working condition of a pumping well based on multi-domain feature fusion of an electric power diagram according to claim 1, characterized in that: Step S3 specifically includes: S31: normalizing the collected active power of the electric power diagram and the polished rod displacement data; S32: using the normalized active power of the electric work diagram and the polished rod displacement data, establishing a pumping unit power-displacement electric work diagram with the ordinate being active power and the abscissa being polished rod displacement; S33: sampling the upstroke power and downstroke power in the pumping unit power-displacement electric work diagram by interpolation method to obtain a pumping unit 4-S electric work diagram with the ordinate being active power and the abscissa being the time corresponding to each active power.
4. The method for diagnosing the working condition of a pumping well based on multi-domain feature fusion of an electric power diagram according to claim 1, characterized in that: In step S5, the expression of the synthetic working condition diagnosis feature vector is specifically: in, is the fused feature vector, is the weight coefficient.
Citation Information
Patent Citations
Rod pumped well working condition diagnosis method based on edge calculation
CN116843606A
Method and system for identifying actual measurement electric power diagram working condition of rod-pumped well
CN117152548A