Rod pumped well working condition diagnosis method based on electrical work diagram multi-domain feature fusion
Through the multi-domain feature fusion method based on the electric power graph, the time-frequency domain and spatial domain characteristics of the pump well are extracted using wavelet transform and Zernike moment, and a fully connected neural network model is established, which solves the problems of high cost, limited range and incomplete feature extraction in the pump well working condition diagnosis, and achieves higher diagnostic accuracy and adaptability.
Patent Information
- Application Number
- CN202510916132.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-08-01
- 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 multi-domain feature fusion method based on the electric power graph is adopted, and the time frequency domain features are extracted through wavelet transformation, and the 4-S electric power diagram of the oil pump is generated. The spatial domain features are extracted in combination with the Zernike moment, and the weight feature fusion method is used to establish a fully connected neural network model for working condition diagnosis.
It improves the accuracy and adaptability of working condition diagnosis, reduces system R&D costs, breaks through the technical bottleneck of traditional working condition recognition, and achieves more comprehensive working condition information extraction and higher diagnostic accuracy.
Smart Images

Figure CN120408473A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of working condition diagnosis of pumping wells, and in particular to a method for diagnosing the working condition of pumping wells based on multi-domain feature fusion of electric work diagrams. Background Art
[0002] The working condition diagnosis of pumping wells mainly relies on the dynamometer card. Using the dynamometer card for diagnosis has the advantages of simplicity, reliability, intuitiveness, etc. However, there are still significant limitations: (1) High system cost: The acquisition of the dynamometer card depends on special load and displacement sensors. The installation positions of such sensors require precision, and the debugging and operation and maintenance processes are cumbersome and require professionals to implement, resulting in an increase in production costs. (2) Limited diagnosis scope: The dynamometer card mainly reflects the working conditions of the downhole equipment of the pumping well, and it is difficult to accurately reflect the operating conditions of the surface equipment of the well. Moreover, effective dynamometer card information cannot be obtained under special environments and well conditions.
[0003] In recent years, researchers have gradually used the electric work diagram for the working condition diagnosis of pumping wells. Compared with the dynamometer card, the acquisition method of the electric work diagram is simpler and the cost is lower. Some achievements have been made in the working condition identification technology of the electric work diagram in the production of pumping wells, but there are still some limitations: (1) Single feature extraction means: Most feature extraction methods only focus on the single feature type of the electric work diagram image and ignore the feature information of the one-dimensional signal of the pumping well. Although some methods extract time-domain or frequency-domain feature information with the one-dimensional signal as the input, they still cannot express the multi-scale feature information of the signal in both the time domain and the frequency domain at the same time, nor can they accurately express the complex signal changes. (2) Weak ability to distinguish complex patterns of images: Most methods directly extract features from the original power-displacement electric work diagram. However, the original power-displacement electric work diagram has problems such as missing time information, difficulty in confirming the corresponding upper and lower dead points of displacement, information sparsity, and weakening of local features, and cannot effectively express fine-grained information such as edge patterns and frequency responses hidden in the image, which limits the accuracy and generalization ability of fault type identification. (3) High redundant dimensions and poor fusion expression: Most current electric work diagram feature fusion methods directly merge feature vectors from different sources into the classification model by means of feature splicing or simple superposition, lacking a redundant suppression and feature compression mechanism, resulting in a relatively high final fusion feature dimension, being unable to fully explore the complementarity of multi-source information, and making the diagnostic method insufficient in terms of adaptability and robustness and difficult to adapt to the working condition changes under actual complex well conditions.
[0004] Therefore, how to mine a large amount of fault information existing in the electric work diagram, more accurately and comprehensively extract the key points of the working condition type features, and effectively improve the accuracy of working condition diagnosis is a technical problem that urgently needs to be solved. Summary of the Invention
[0005] The present invention provides a method for diagnosing the working conditions of pumping wells based on the multi-domain feature fusion of electric power diagrams, aiming to solve at least one of the above technical problems.
[0006] To achieve the above object, the present invention provides a method for diagnosing the working conditions of pumping wells based on the multi-domain feature fusion of electric power diagrams, including the following steps: S1: Obtain the active power of the measured electric power diagram and the polished rod displacement data of the target pumping well; S2: Use wavelet transform to extract the time-frequency domain features of the active power of the measured electric power diagram of the target pumping well to obtain a time-frequency domain feature vector; S3: Based on the active power of the electric power diagram and the polished rod displacement data, generate a power-displacement electric power diagram of the pumping well, and convert the power-displacement electric power diagram of the pumping well into a 4-S electric power diagram of the pumping well; Among them, the power-displacement electric power diagram of the pumping well is configured as an image with the vertical coordinate being the active power and the horizontal coordinate being the polished rod displacement, and the 4-S electric power diagram of the pumping well is configured as an image with the vertical coordinate being the active power and the horizontal coordinate being the time corresponding to each active power; S4: Use a feature extraction method combining wavelet transform and Zernike moments to extract the spatial domain features of the 4-S electric power diagram of the pumping well to obtain a spatial domain feature vector; S5: Based on the time-frequency domain feature vector and the spatial domain feature vector, use a method of weighted feature fusion to synthesize a working condition diagnosis feature vector, and use the synthesized working condition diagnosis feature vector to establish a working condition diagnosis model of the electric power diagram of the pumping well with a fully connected neural network; S6: Use the established working condition diagnosis model of the electric power diagram of the pumping well to perform the working condition diagnosis of the pumping well.
[0007] Optionally, step S1 specifically includes: S11: Use the power acquisition module installed on the target pumping well to collect the active power signal of the electric power diagram, and process the collected active power signal of the electric power diagram to obtain the active power of the electric power diagram; S12: Use the LVDT sensor installed on one side of the polished rod of the target pumping well to collect the polished rod displacement data of the target pumping well.
[0008] Optionally, step S2 specifically includes: S21: Use discrete wavelet transform to decompose the active power of the measured electric power diagram of the target pumping well into signals with different resolution levels through a low-pass filter LP and a high-pass filter HP; S22: Extract the time-frequency domain features of the active power of the measured electric power diagram of the target pumping well to obtain a time-frequency domain feature vector; among them, the time-frequency domain features include the energy sizes of sub-bands with different coefficients, the degree of dispersion measuring the energy distribution of the signal, and the energy ratio of each frequency sub-band in the whole signal.
[0009] Optionally, the expression in step S21 is specifically: Wherein, represents the decomposition level, taking 1, 2, 3, 4, is the approximation coefficient, is the detail coefficient, represents the discrete point position, represents the downsampling of the low-pass filter LP, represents the downsampling of the high-pass filter HP, represents the value of the approximation coefficient obtained by the decomposition of the th layer at position n, represents the th layer of the detail coefficient obtained by the decomposition at position n.
[0010] Optionally, the expression in step S22 is specifically: Wherein, is the time-frequency domain feature vector, represents the sub-band energy feature vector of the detail coefficient , and the discrete degree of the signal energy distribution measured is defined as the wavelet distribution entropy, is the wavelet distribution entropy feature vector of the detail coefficient , and the energy proportion of each frequency sub-band in the whole signal is defined as the frequency band energy weight, represents the frequency band energy weight feature vector of the detail coefficient , represents the total energy, and N represents the number of coefficients.
[0011] Optionally, step S3 specifically includes: S31: Normalize the active power of the collected electric work diagram and the polished rod displacement data; S32: Use the normalized active power of the electric work diagram and the polished rod displacement data to establish a pumping unit power-displacement electric work diagram with the active power on the vertical coordinate and the polished rod displacement on the horizontal coordinate; 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.
[0012] Optionally, step S4 specifically includes: S41: Using discrete wavelet transform to enhance the spatial domain characteristics of the 4-S electrical power diagram of the pumping unit; 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.
[0013] Optionally, step S41 specifically includes: 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.
[0014] Optionally, step S42 specifically includes: 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 .
[0015] Optionally, 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.
[0016] The beneficial effects of the present invention are as follows: (1) A method for diagnosing the working conditions of pumping wells based on multi-domain feature fusion of electric power diagrams 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 solves the problems of the traditional electric power diagram feature extraction method that fails to excavate a large amount of fault information in the active power signal of the electric power diagram, cannot simultaneously express the multi-scale feature information of the signal in the time domain and the frequency domain, and cannot accurately express the complex signal changes.
[0017] (2) By transforming the power-displacement electric power diagram of the pumping unit into the time domain to generate the 4-S electric power diagram of the pumping unit and using the discrete wavelet transform to enhance the spatial domain features of the 4-S electric power diagram of the pumping unit, problems such as the easy neglect of local weak edges, vibration fluctuations, etc. in the image and low image extraction rate are solved, the utilization rate of feature information is improved, and the accuracy of diagnosing the working conditions of pumping wells is enhanced.
[0018] (3) A method for extracting the spatial domain feature vector of the 4-S electric power diagram of the pumping unit by combining wavelet transform and Zernike moments is proposed, and then the weight feature fusion method is used to fuse the time-frequency domain and the spatial domain of the electric power diagram. This solves the problems of high redundant dimensions of feature information and poor fusion expression, enriches the multi-domain feature extraction method, improves the accuracy of working condition recognition, breaks through the technical bottleneck of traditional working condition recognition, has strong engineering practicability, low system R & D cost, and has good popularization and application value. A method for diagnosing the working conditions of pumping wells based on multi-domain feature fusion of electric power diagrams. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is a schematic flow chart of the method for diagnosing the working conditions of pumping wells based on multi-domain feature fusion of electric power diagrams according to the embodiment of the present invention; Figure 2 is the displacement-power electric power diagram of the pumping unit constructed by the method for diagnosing the working conditions of pumping wells based on multi-domain feature fusion of electric power diagrams according to the embodiment of the present invention; Figure 3 is the 4-S electric power diagram of the pumping unit constructed by the method for diagnosing the working conditions of pumping wells based on multi-domain feature fusion of electric power diagrams according to the embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0020] In order to make the purpose, technical solutions and advantages of the present invention clearer, 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 used to limit the present invention.
[0021] The embodiment of the present invention provides a method for diagnosing the working conditions of pumping wells based on multi-domain feature fusion of electric power diagrams. Refer to Figure 1 , Figure 1This is a schematic flowchart of the working condition diagnosis method for pumping unit wells based on the multi-domain feature fusion of electric power diagrams in the embodiments of the present invention.
[0022] In this embodiment, a working condition diagnosis method for pumping unit wells based on the multi-domain feature fusion of electric power diagrams includes the following steps: S1: Obtain the active power and polished rod displacement data of the measured electric power diagram of the target pumping unit; S2: Use wavelet transform to extract the time-frequency domain features of the active power of the measured electric power diagram of the target pumping unit to obtain a time-frequency domain feature vector; S3: Based on the active power of the electric power diagram and the polished rod displacement data, generate a power-displacement electric power diagram of the pumping unit, and convert the power-displacement electric power diagram of the pumping unit into a 4-S electric power diagram of the pumping unit; Among them, the power-displacement electric power diagram of the pumping unit is configured as an image with the vertical coordinate being the active power and the horizontal coordinate being the polished rod displacement, and the 4-S electric power diagram of the pumping unit is configured as an image with the vertical coordinate being the active power and the horizontal coordinate being the time corresponding to each active power; S4: Use a feature extraction method combining wavelet transform and Zernike moments to extract the spatial domain features of the 4-S electric power diagram of the pumping unit to obtain a spatial domain feature vector; S5: Based on the time-frequency domain feature vector and the spatial domain feature vector, use a method of weighted feature fusion to synthesize a working condition diagnosis feature vector, and use the synthesized working condition diagnosis feature vector to establish a working condition diagnosis model of the electric power diagram of the pumping unit with a fully connected neural network; S6: Use the established working condition diagnosis model of the electric power diagram of the pumping unit to perform the working condition diagnosis of the pumping unit.
[0023] It should be noted that the existing technology for extracting the characteristics of fault information is still very single. Most of them only focus on the image characteristics of the electric work diagram, while ignoring various characteristic information of one-dimensional signals, so that a large amount of fault information existing in the electric work diagram has not been mined. Most of the existing technologies directly extract features from the original power-displacement electric work diagram. However, the original displacement-power electric work diagram has problems such as missing time information and difficulty in confirming the corresponding top and bottom dead points of the displacement. Moreover, information such as local weak edges, vibration fluctuations, and burr features in the original power-displacement electric work diagram is easily submerged or ignored, resulting in unstable feature extraction and low accuracy of working condition recognition. Therefore, how to process the original power-displacement electric work diagram first and then extract features is the key to more accurately and comprehensively extracting the features of working condition types. The existing technology usually extracts features in a certain domain for working condition diagnosis, while the working condition types of pumping wells are diverse and are reflected in multiple aspects such as the time-frequency domain and the spatial domain. Some diagnostic methods extract features in multiple aspects, but only simply splice these features for working condition diagnosis, which reduces the utilization rate of features, increases the degree of information redundancy, and affects the diagnostic accuracy of working conditions. Therefore, how to extract and fuse multi-domain features is the key to effectively improving the diagnostic accuracy of working conditions.
[0024] To solve the above problems, in this embodiment, discrete wavelet transform is used to extract the time-frequency domain features of the active power signal of the pumping unit electric work diagram. By transforming the power-displacement electric work diagram of the pumping unit into the time domain to generate the 4-S electric work diagram of the pumping unit and using discrete wavelet transform to enhance the spatial domain features of the 4-S electric work diagram of the pumping unit, and using the weighted feature fusion method to fuse the time-frequency domain and the spatial domain of the electric work diagram, it solves the shortcomings that the traditional electric work diagram feature extraction method has not 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 the frequency domain, and cannot accurately express the complex signal changes, solves the problems that information such as local weak edges and vibration fluctuations in the image are easily ignored and the image extraction rate is not high, improves the utilization rate of feature information, enhances the diagnostic accuracy of the working conditions of pumping wells. 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 recognition, breaks through the technical bottleneck of traditional working condition recognition, has strong engineering practicability, low system R & D cost, and has good popularization and application value, a working condition diagnosis method for pumping wells based on multi-domain feature fusion of electric work diagrams.
[0025] To more clearly explain the present invention, the following provides a specific example of the working condition diagnosis method for pumping wells based on multi-domain feature fusion of electric work diagrams of the present invention, including the following implementation steps: Step 1: Obtain the measured active power signal of the pumping unit electric work diagram and the polished rod displacement data, and store the active power data of the pumping unit electric work diagram and the polished rod displacement data obtained after processing the obtained active power signal of the pumping unit together.
[0026] Step 2: Use wavelet transform to extract the time-frequency domain features of the active power signal of the pumping unit's electric work diagram, and obtain the time-frequency domain feature vector .
[0027] Step 3: Use the stored data to normalize and then draw the power-displacement electric work diagram of the pumping unit, and through calculation and analysis, convert it into the 4-Stage (4-S) electric work diagram of the pumping unit. The power-displacement electric work diagram of the pumping unit is an image drawn with the active power as the vertical coordinate and the polished rod displacement as the horizontal coordinate. The 4-Stage (4-S) electric work diagram of the pumping unit is a 4-Stage image with the active power as the vertical coordinate and the time corresponding to each active power as the horizontal coordinate.
[0028] Step 4: Use a feature extraction method combining wavelet transform and Zernike moments to extract the feature information in the spatial domain of the 4-S electric work diagram of the pumping unit, and obtain the spatial domain feature vector .
[0029] Step 5: The time-frequency domain feature vector obtained in Step 2 and the spatial domain feature vector obtained in Step 4 are fused into a working condition diagnosis feature vector using the weighted feature fusion method , and a working condition diagnosis model of the pumping unit's electric work diagram based on multi-domain feature fusion and fully connected neural network is established.
[0030] In a preferred embodiment, in Step 1, an electric power acquisition module installed on the pumping unit is used to obtain the active power signal of the pumping unit's electric work diagram, and after processing, the active power data of the pumping unit's electric work diagram is obtained. The polished rod displacement data obtained by using an LVDT sensor installed on one side of the polished rod of the pumping unit.
[0031] 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's electric work diagram. The core idea of wavelet transform is to decompose the signal into a series of wavelet functions with different scales and frequencies. A wavelet refers to the stretching and translation transformation of the wavelet function, as shown in Equation 1.1: (1.1) Where is the scaling factor, is the translation factor, is the wavelet function.
[0032] For the signal , the continuous wavelet transform (CWT) is as shown in Equation 1.2: (1.2) While the discrete wavelet is obtained by taking and Discretization of two consecutive factors, as shown in Equation 1.3: (1.3) Wherein, .
[0033] The corresponding discrete wavelet expression is as shown in Equation 1.4: (1.4) For the signal The discrete wavelet transform (DWT) is as shown in Equation 1.5.
[0034] (1.5) Wherein, is the complex conjugate of the wavelet function.
[0035] Considering that the active power signal of the pumping unit power diagram itself belongs to discrete digital signals, and the pumping unit working site has strict requirements for real-time fault warning and delay processing, while the continuous wavelet transform has high computational complexity and is difficult to process online. Therefore, this patent selects the discrete wavelet transform to extract the time-frequency domain characteristics of the active power signal of the pumping unit power diagram. By using a low-pass and a high-pass filter, the active power signal of the pumping unit power diagram is decomposed into other signals at different resolution levels, is further divided into coefficients and , until the specified decomposition level is reached. The decomposition formula of the discrete wavelet transform is as shown in 1.6: (1.6) Wherein, (1, 2, 3, 4) represents the decomposition level, is the approximation coefficient, is the detail coefficient.
[0036] Since the active power signal of the pumping unit power diagram exhibits significant periodicity and non-stationary characteristics, and the mutation signals occur in different frequency bands, this experiment selects the Daubechies-4 (db4) wavelet basis for four-layer discrete wavelet decomposition to obtain the coefficient set as shown in 1.7: (1.7) The calculation formula for the sub-band energy of different coefficients is as shown in 1.8: (1.8) Wherein, N represents the number of coefficients. Based on the fact that the detail coefficients can better reflect the transient signals of faults and reduce information redundancy, the sub-band energy eigenvector of the detail coefficient is calculated by Equation 1.8 。
[0037] Define the discreteness of measuring the signal energy distribution as the wavelet distribution entropy, and the calculation formula is as shown in 1.9: (1.9) The wavelet distribution entropy eigenvector of the detail coefficients is calculated from formula 1.9 Define the energy proportion of each frequency sub-band in the whole signal as the frequency band energy weight, and the calculation formula is as shown in 1.10: (1.10) Among them, represents the total energy.
[0038] The frequency band energy weight eigenvector of the detail coefficients is calculated from formula 1.10 。
[0039] Finally, the time-frequency domain eigenvector is obtained 。
[0040] Thus, the present invention uses discrete wavelet transform to extract time-frequency domain features from the active power signal of the electric work diagram, solving the problems of lack of one-dimensional signal feature information and non-stationarity of the active power signal of the electric work diagram in working condition diagnosis. The electric power signals collected on-site are often accompanied by a large amount of random noise, and wavelet decomposition naturally has a certain noise suppression ability. For example, if only the time-frequency domain features of – and are extracted, the high-level noise is directly ignored. Discrete wavelet transform provides feature information in both the time domain and the frequency domain at the same time, overcomes the defects of the single perspective of FFT and time domain statistics, and the feature dimension is controllable. After hierarchical decomposition, only a limited number of indicators (sub-band energy, small energy wave entropy, frequency band energy weight) are taken, and the feature dimension is small but the information content is high.
[0041] In a preferred embodiment, in step 3, the power-displacement electric work diagram of the pumping unit is an image drawn with the polished rod displacement as the abscissa and the active power as the ordinate.
[0042] The electric work diagram image is drawn through the OpenCV library of Python. Before drawing the electric work diagram image, the data is first normalized, and the mean normalization method is adopted, and the method is as shown in 1.11: (1.11) Among them, is the data after mean normalization processing, is the original single data, is the minimum value among all the data; is the maximum value among all the data, is the average value of all the data.
[0043] Then, taking the active power as the vertical axis and the polished rod displacement as the horizontal axis, and setting the corresponding positions of the data to black (0) with a white background (255), a pumping unit power-displacement electrogram is made according to the normalized data. This representation method shows the structural characteristics of the data and is also convenient for subsequent processing and analysis work. However, the pumping unit power-displacement electrogram has problems of missing time information and difficulty in confirming the upper and lower dead points corresponding to the displacement, which leads to a low extraction rate of spatial domain features and complex data preprocessing. Therefore, the pumping unit power-displacement electrogram is converted into a pumping unit 4-Stage (4-S) electrogram.
[0044] Perform calculation and analysis on the pumping unit power-displacement electrogram to determine four points A, B, C, D as Figure 2 shown by the red circles in the figure, that is, divide the pumping unit power-displacement electrogram into 4-S curves, S1 is (from A to B), S2 is (from B to C), S3 is (from C to D), and S4 is (from D to A). Then, according to the sampling period of the pumping unit power-displacement electrogram, the time corresponding to each power can be obtained, and the power during the upstroke and downstroke is sampled by the interpolation method to obtain Figure 3 the pumping unit (4-S) electrogram shown in the figure. The (4-S) electrogram is a 4-Stage image with the active power as the vertical coordinate and the time corresponding to each active power as the horizontal coordinate. It should be noted that the pumping unit power-displacement electrogram is established based on the normalized data, and the pumping unit (4-S) electrogram is converted from the pumping unit power-displacement electrogram. Therefore, Figure 2 and Figure 3 the numerical values represented by the horizontal and vertical coordinates are unitless values after normalization processing.
[0045] Thus, the present invention converts the pumping unit power-displacement electrogram into a pumping unit 4-Stage (4-S) electrogram. It solves the problems of missing time information and difficulty in confirming the upper and lower dead points corresponding to the displacement in the pumping unit power-displacement electrogram. The pumping unit 4-S electrogram can more clearly show the time dynamic changes during the pumping process, which helps to identify transient or intermittent anomalies that may not be obvious in the pumping unit power-displacement electrogram. The pumping unit power-displacement electrogram only shows the spatial scale and cannot reflect the process of change over time. The pumping unit 4-S electrogram integrates the time scale and can comprehensively display the pumping dynamic process, which helps to perform more accurate dynamic analysis.
[0046] In a preferred embodiment, in step 4, the time-frequency domain characteristics of the active power signal in the pumping unit electric power diagram can accurately represent the working state of the pumping unit under some faults, but there are still certain limitations. Therefore, a method for extracting the spatial domain characteristics of the 4-S electric power diagram of the pumping unit based on the combination of wavelet transform and Zernike moment is studied to improve the characteristic analysis of the electric power diagram.
[0047] The method combining wavelet transform and Zernike moment consists of two parts: wavelet transform and Zernike moment. Traditional methods for extracting the characteristics of the electric power diagram generally directly extract the characteristics from the original power-displacement electric power diagram, and information such as local weak edges and vibration fluctuations in the image is easily ignored. To improve this situation, the discrete wavelet transform is first used to enhance the spatial domain characteristics of the 4-S electric power diagram of the pumping unit, thus creating better conditions for extracting the spatial domain characteristics of the 4-S electric power diagram of the pumping unit, and then the Zernike moment is used to extract the spatial domain characteristics of the 4-S electric power diagram of the pumping unit.
[0048] The steps of using the discrete wavelet transform to enhance the spatial domain characteristics of the 4-S electric power diagram of the pumping unit are as follows: (1) Select the Daubechies-4 (db4) wavelet basis function and perform two-dimensional wavelet transform on the image of the 4-S electric power diagram of the pumping unit The two-dimensional discrete wavelet formula is as shown in 1.12: (1.12) where, ; is a random starting scale, generally 0; and are the offsets relative to ; is a discrete function, and are discrete variables; and represent the size of the image; and are two-dimensional wavelet functions; represents the low-frequency coefficient after decomposition, represents the high-frequency coefficients in different directions after decomposition, respectively represent the high-frequency coefficients of the image in the horizontal, vertical, and diagonal directions.
[0049] (2) Using the above method for two wavelet decompositions can decompose the image of the 4-S electric power diagram of the pumping unit into multiple low-frequency and high-frequency coefficients.
[0050] (3) Process the decomposed coefficients. The fusion method for the low-frequency coefficients adopts the weighted average method, and the method is as shown in 1.13: (1.13) Among them, represents the fused low-frequency coefficient, and represents the low-frequency coefficient of the same decomposition layer.
[0051] Enhance the high-frequency coefficient, and the formula is as Equation 1.14: (1.14) Among them, select the optimal , is the high-frequency coefficient in each direction, is the enhanced high-frequency coefficient.
[0052] (4) Reconstruct the 4-S electric power diagram image of the pumping unit using the inverse wavelet transform for the processed low-frequency and high-frequency coefficients , and the wavelet reconstruction formula is as Equation 1.15: (1.15) For the enhanced 4-S electric power diagram image of the pumping unit extract the spatial domain features using Zernike moments. The specific steps are as follows: (1) Calculate the centroid position of the 4-S electric power diagram image of the pumping unit, and translate the centroid position of the image to the coordinate origin.
[0053] (2) Map each pixel position in the 4-S electric power diagram image of the pumping unit to the unit circle. The mapping is defined as Equation 1.16: (1.16) Among them, represents the point to the vector length of the origin, represents the vector and the included angle of the horizontal axis.
[0054] (2) Extract the spatial domain features using Zernike moments. The definition of the Zernike basis function is as Equation 1.17: (1.17) Among them, is the imaginary unit, represents the polynomial order, represents the angular order (integer). The radial polynomial is defined as Equation 1.18: (1.18) Among them, represents the summation variable, which is used to calculate each term in the expansion of the polynomial. The calculation formula of Zernike moments is as Equation 1.19: (1.19) For different polynomial orders and angular orders of the Zernike moments, calculate the modulus values to form the final feature vector: (1.20) In order to fully represent the structural detail changes in the 4-S electric power diagram of the pumping unit, select the order to extract the spatial domain features of the 4-S electric power diagram of the pumping unit, and form the spatial domain feature vector as shown in 1.21: (1.21) Therefore, the present invention proposes a combined method of wavelet transform-Zernike moments for extracting spatial domain features of the 4-S electric power diagram of the pumping unit, which solves the problem that information such as local weak edges and vibration fluctuations in the image is easily ignored in the traditional electric power diagram feature extraction method. First, use discrete wavelet transform to enhance the spatial domain features of the 4-S electric power diagram of the pumping unit, thus creating better conditions for extracting the spatial domain features of the 4-S electric power diagram of the pumping unit. Then, use Zernike moments to extract the spatial domain features of the 4-S electric power diagram of the pumping unit, obtaining more effective spatial domain features and improving the accuracy of working condition recognition.
[0055] In a preferred embodiment, in step 5, an electric power diagram working condition recognition model that fuses multi-domain features and a fully connected neural network.
[0056] Use the weight feature fusion method to combine the time-frequency domain feature vector obtained in step 2 and the spatial domain feature vector obtained in step 4 into a new set of feature vectors as the working condition diagnosis feature vector.
[0057] The calculation formula for weight feature fusion of different domain feature vectors is as shown in 1.22: (1.22) Wherein, is the fused feature vector, is the weight coefficient, and the optimal value is taken as 0.6.
[0058] The fused feature vector is: Taking into comprehensive consideration factors such as the stability of the model, selecting a classification model with a simple structure, high computational efficiency, and being applicable to small-sample industrial data scenarios, the selected classification model is a fully connected neural network. The weight feature fusion is used to obtain the working condition diagnosis feature vector S as the input of the fully connected neural network, and the number of nodes in the input layer of the neural network is set to 12. The working conditions for diagnosis are: normal working condition, insufficient liquid supply, hitting the pump downward, pumping and spraying simultaneously, fixed valve leakage, and the number of neurons in the output layer is set to 5. A single hidden layer structure is adopted, and through experimental evaluation, the number of hidden layer neurons is determined to be 30, the maximum number of iterations is set to 100, and the convergence accuracy is 0.00001.
[0059] Thus, the present invention uses a weight feature fusion method to fuse the extracted time-frequency domain features and spatial domain features, solving problems such as dimensional expansion and fault information redundancy caused by direct splicing of traditional features. Different faults in pumping wells have different manifestations in the time-frequency domain and spatial domain. Using weight feature fusion can take into account the complementarity of different fault types, effectively suppress redundancy, and improve the adaptability and robustness of the model.
[0060] It can be understood that in the description of this specification, the descriptions referring to terms such as "one embodiment", "another embodiment", "other embodiments", or "the first embodiment to the Nth embodiment" mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.
[0061] It should be noted that in this article, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or system. Without more limitations, the element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or system including the element.
[0062] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A working condition diagnosis method for pumping wells based on multi-domain feature fusion of electric power diagrams, characterized in that, It includes the following steps: S1: Obtain the active power and polished rod displacement data of the measured electric work diagram of the target pumping unit; S2: Use wavelet transform to extract the time-frequency domain characteristics of the active power of the measured electric work diagram of the target pumping unit, and obtain the time-frequency domain feature vector; specifically including: S21: Use discrete wavelet transform, through the low-pass filter LP and the high-pass filter HP, to decompose the active power of the measured electric work diagram of the target pumping unit into signals at different resolution levels; The expression is specifically: Among them, represents the decomposition level, taking values 1, 2, 3, 4, is the approximation coefficient, is the detail coefficient, represents the discrete point position, represents the downsampling of the low-pass filter LP, represents the downsampling of the high-pass filter HP, represents the value of the approximation coefficient obtained from the decomposition of the th layer at position n, represents the value of the detail coefficient obtained from the decomposition of the th layer at position n; S22: Extract the time-frequency domain characteristics of the active power of the measured electric work diagram of the target pumping unit to obtain the time-frequency domain feature vector; wherein, the time-frequency domain characteristics include the sub-band energy sizes of different coefficients, the discrete degree of measuring the signal energy distribution, and the energy ratio of each frequency sub-band in the whole signal; The expression is specifically: Among them, is the time-frequency domain feature vector, represents the sub-band energy feature vector of the detail coefficient The discrete degree of measuring the signal energy distribution is defined as the wavelet distribution entropy. is the detail coefficient The wavelet distribution entropy feature vector. The energy proportion of each frequency sub-band in the whole signal is defined as the frequency band energy weight. represents the detail coefficient The frequency band energy weight feature vector. 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, generate the power-displacement electric work diagram of the pumping unit and convert it into the 4-S electric work diagram of the pumping unit; S4: Use the feature extraction method combining wavelet transform and Zernike moment to extract the spatial domain characteristics of the 4-S electric work diagram of the pumping unit, and obtain the spatial domain feature vector; specifically including: S41: Use discrete wavelet transform to enhance the spatial domain characteristics of the 4-S electric work diagram of the pumping unit; specifically including: S411: Select the Daubechies-4 wavelet basis function and perform two-dimensional wavelet transform on the image of the 4-S electric power diagram of the pumping unit. The expression is as follows: The expression is as follows: S412: Repeat the wavelet decomposition in step S411 to decompose the 4-S electric work diagram image of the pumping unit into multiple low-frequency coefficients and high-frequency coefficients; S413: Use the weighted average method for the multiple low-frequency coefficients obtained after decomposition, and use the enhancement processing for the multiple high-frequency coefficients obtained after decomposition. The expression is: Among them, represents the fused low-frequency coefficient, and represent the low-frequency coefficients of the same decomposition layer; Among them, take , as the high-frequency coefficients in each direction, as the enhanced high-frequency coefficients; S414: Reconstruct the image of the electric power diagram of the pumping unit 4-S by using the inverse wavelet transform for the processed low-frequency coefficients and high-frequency coefficients. , and the expression is: Among them, ; is a random starting scale; and are the offsets relative to ; is a discrete function, and are discrete variables; and represent the size of the image; and are two-dimensional wavelet functions; represents the low-frequency coefficients after decomposition, represents the high-frequency coefficients in different directions after decomposition, respectively represent the high-frequency coefficients of the image in the horizontal, vertical, and diagonal directions; S42: Use Zernike moment to extract the spatial domain characteristics of the enhanced 4-S electric work diagram image of the pumping unit to obtain the spatial domain feature vector; specifically including: S421: Calculate the centroid position of the 4-S electric work diagram image of the pumping unit and translate it to the coordinate origin; S422: Map each pixel position in the 4-S electric work diagram image of the pumping unit into the unit circle. The expression is: Among them, represents the vector length from the point to the origin, represents the vector and the included angle between the horizontal axis; S423: Use Zernike moment to extract the spatial domain characteristics. The expression is: [[IDID=0]]Among them, represents the final spatial domain feature vector extracted by Zernike moments, represents the calculation result of Zernike moments, represents different polynomial orders , angular degrees to calculate the modulus value of Zernike moments, represents the summation variable used to expand the calculation of each term in the polynomial, represents the Zernike basis function, is the imaginary unit, represents the radial polynomial; S424: Select the end n = 4, extract the spatial domain features of the electric work diagram of the pumping unit 4-S, and form a spatial domain feature vector ; S5: Based on the time-frequency domain feature vector and the spatial domain feature vector, use the method of weight feature fusion to synthesize the working condition diagnosis feature vector, and use the synthesized working condition diagnosis feature vector to establish a full-connection neural network pumping unit electric work diagram working condition diagnosis model; S6: Use the established pumping unit electric work diagram working condition diagnosis model to perform pumping unit working condition diagnosis.
2. The working condition diagnosis method for pumping wells based on multi-domain feature fusion of electric power diagrams according to claim 1, wherein Step S1 specifically includes: S11: Use the power acquisition module installed on the target pumping unit to collect the active power signal of the electric work diagram, and process the collected active power signal of the electric work diagram to obtain the active power of the electric work diagram; S12: Use the LVDT sensor installed on one side of the polished rod of the target pumping unit to collect the polished rod displacement data of the target pumping unit.
3. The working condition diagnosis method for pumping wells based on multi-domain feature fusion of electric power diagrams according to claim 1, characterized in that Step S3 specifically includes: S31: Normalize the collected active power of the electric work diagram and the polished rod displacement data; S32: Use the normalized active power of the electric work diagram and the polished rod displacement data to establish a pumping unit power-displacement electric work diagram with the ordinate being the active power and the abscissa being the polished rod displacement. S33: Sample the upstroke power and downstroke power in the power-displacement electric work diagram of the pumping unit by interpolation method to obtain the 4-S electric work diagram of the pumping unit with the image where the vertical coordinate is the active power and the horizontal coordinate is the time corresponding to each active power.
4. The working condition diagnosis method for pumping wells based on multi-domain feature fusion of electric power diagrams according to claim 1, characterized in that In step S5, the expression for synthesizing the diagnostic feature vector under the combined working conditions is specifically: Among them, is the fused feature vector, is the weight coefficient.
Citation Information
Patent Citations
Rod pumped well working condition diagnosis method integrated with electrical work diagram and indicator diagram
CN106837301A
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