Fault diagnosis method and system architecture for pumping unit based on multi-dimensional error fusion manifold features

CN122530219BActive Publication Date: 2026-10-23XINJIANG G C ENERGY TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611023124.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-10
Publication Date
2026-10-23
Estimated Expiration
2046-07-10

AI Technical Summary

Technical Problem

[0005]本发明的目的是提供基于多维误差融合流形特征的抽油机故障开集诊断方法及系统架构,解决现有技术无法同时兼顾未知故障拒判、小样本故障精准识别的技术瓶颈,实现油田示功图工况的开集式精准诊断,适配现场复杂、多变、样本不均衡的真实生产场景

Benefits of technology

本发明依托正常流行与多维评价偏离误差分值的约束,配合故障原型匹配机制,实现了对待测示功仪样本的两阶段开集诊断,解决闭集模型无法适配油井工况动态波动的现象,也解决了现有模型仅依赖纯数据特征判定故障,致使诊断结果无物理依据、可追溯性差,且易出现形态相似、机理矛盾误匹配等问题,显著提升了稀有、重大故障的泛化识别能力,契合油田故障小概率、不均衡的真实样本分布特点,满足油田安全生产风控需求,摒弃了对海量样本的依赖。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122530219B_ABST
    Figure CN122530219B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of oil well fault diagnosis, and particularly provides a pumping unit fault open set diagnosis method and diagnosis system architecture based on multi-dimensional error fusion manifold features, which comprises the following steps: S1, obtaining dynamometer card sample data and preprocessing the same; S2, extracting multi-dimensional state features of the preprocessed dynamometer card sample data and forming a high-dimensional feature vector set; S3, constructing a normal manifold model and a fault prototype library according to normal and fault high-dimensional feature vector sets, and simultaneously, constructing an evaluation sub-model according to the preprocessed dynamometer card sample data; S4, processing a sample to be tested in the same manner as in steps S1 and S2, and calculating multi-dimensional deviation errors through the normal manifold model and the evaluation sub-model, and comparing the weighted fusion of the multi-dimensional errors with a preset alarm threshold to realize abnormality judgment, and after abnormality, entering a fault prototype matching verification link to complete known and unknown fault discrimination from the physical mechanism aspect; and the system architecture corresponds to the above diagnosis method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent diagnosis technology for oil well faults, and particularly relates to a method and system architecture for open set diagnosis of pumping unit faults based on multidimensional error fusion manifold features. Background Technology

[0002] Dynamometer diagram analysis is a core tool for downhole condition monitoring and fault diagnosis of pumping units. It can effectively identify downhole anomalies such as pump leakage, gas lock, and rod string jamming, providing crucial data support for oilfield production and maintenance. Currently, most intelligent diagnostic technologies for dynamometer diagrams in the industry adopt traditional supervised closed-set classification frameworks, which have many technical shortcomings that make them difficult to adapt to the complex field conditions of oilfields. First, closed-set classification models have inherent limitations in recognition and lack the ability to reject unknown faults. These models assume that all test samples belong to known categories covered by the training set and lack a mechanism for identifying unknown operating conditions. Oilfield downhole operating conditions are affected by factors such as formation fluctuations, equipment aging, and operational adjustments, which can easily lead to new types of complex faults and unlabeled abnormal operating conditions. Closed-set models will forcibly classify such unknown samples, which can easily cause misdiagnosis and misjudgment, interfering with on-site operation and maintenance decisions.

[0003] Secondly, traditional supervised models are poorly adapted to small sample scenarios in oilfields. In oilfield production, the sample base of normal operating conditions is large, while serious and rare faults are low-probability events. Furthermore, the cost of verifying fault samples and manually labeling them is high, making it difficult to form a balanced dataset. Conventional classification models do not learn the features of rare faults sufficiently, have weak generalization ability, and cannot accurately identify serious faults in small samples, making it difficult to meet the needs of oilfield safety production management and control.

[0004] In summary, existing technologies cannot simultaneously address the shortcomings of failing to diagnose unknown faults and accurately diagnosing faults in small sample sizes. There is an urgent need for an open-set dynamometer card fault diagnosis solution that is adapted to the complex working conditions of oilfields. Summary of the Invention

[0005] The purpose of this invention is to provide an open-set diagnosis method and system architecture for pumping unit faults based on multi-dimensional error fusion manifold features, which solves the technical bottleneck of existing technologies that cannot simultaneously address the rejection of unknown faults and the accurate identification of faults in small samples, and realizes open-set accurate diagnosis of oilfield dynamometer card conditions, adapting to real production scenarios with complex, variable, and unbalanced samples.

[0006] This solution provides an open-set diagnostic method for pumping unit faults based on multi-dimensional error fusion manifold features, including the following steps: Step S1: Obtain dynamometer diagram sample data containing timestamps, displacements, and loads. This dynamometer diagram sample data includes historical dynamometer diagram samples under normal operating conditions and historical dynamometer diagram samples under fault conditions, and perform preprocessing operations on them. Step S2: Extract the multi-dimensional state features corresponding to the preprocessed historical dynamometer diagram samples under normal operating conditions and historical dynamometer diagram samples under fault conditions, and form a normal high-dimensional feature vector set and a fault high-dimensional feature vector set respectively. Step S3: Simultaneously construct a normal manifold model based on the normal high-dimensional feature vector set, and construct a fault prototype library based on the fault high-dimensional feature vector set; at the same time, construct an error evaluation sub-model based on the preprocessed dynamometer card sample data. Step S4: Process the dynamometer card sample to be tested in the same way as in steps S1 and S2 to obtain the high-dimensional feature vector set to be tested. Input the high-dimensional feature vector set to be tested into the normal manifold model. Input the preprocessed dynamometer card sample to be tested into the error evaluation sub-model to calculate the multi-dimensional single-item deviation error score. Then, use a weighted fusion algorithm to generate a comprehensive inconsistency score that characterizes the degree of deviation of the current oil well operating condition. Step S5: Compare the comprehensive inconsistency score with the preset alarm threshold. When the working condition is determined to be abnormal, match and verify the high-dimensional feature vector set to be tested with the fault prototype library, and output the final fault diagnosis result of the current oil well.

[0007] As a preferred embodiment of this application: the indicator diagram sample data is an indicator diagram sequence sample, and step S1, the step of preprocessing the indicator diagram sequence sample, includes: Step S11: Divide the indicator diagram sequence sample into multiple segments of single-stroke data according to the stroke boundary; Step S12: The lengths of the multiple segments of single-stroke data are unified by resampling and then normalized.

[0008] As a preferred embodiment of this application: in step S2, the extracted multidimensional state features include at least: load distribution features, displacement statistical features, dynamometer shape features, physical features, and frequency domain features.

[0009] As a preferred embodiment of this application: In step S3, the method for constructing a normal manifold model for a single well and / or a well group based on a normal high-dimensional feature vector set includes: Step S31: Based on the normal high-dimensional feature vector set, calculate the global mean vector and regularized covariance matrix of the multidimensional feature space; Step S32: The distribution region of the multidimensional state feature vector under normal operating conditions in high-dimensional space is characterized by the global mean vector and the regularized covariance matrix, thereby completing the construction of the normal manifold model.

[0010] As a preferred embodiment of this application: in step S3, the error evaluation sub-model includes at least a PCA reconstruction evaluation sub-model, a temporal smoothness evaluation sub-model, and a physical consistency evaluation sub-model; The PCA reconstruction evaluation sub-model construction method includes: building a principal component analysis reconstruction operation architecture, fitting a principal component analysis transformation matrix based on the load data in the preprocessed historical dynamometer diagram sample of the normal working condition, retaining the first k principal components to form a projection and reconstruction mapping relationship, and storing the projection matrix and reconstruction mapping matrix, thereby completing the construction of the PCA reconstruction evaluation sub-model. The method for constructing the time-series smoothness evaluation sub-model includes: building a roughness calculation architecture based on the second-order difference mean square value of time series, calculating the time-series roughness corresponding to the load data in the historical dynamometer diagram sample of the normal working condition, statistically analyzing and storing the roughness distribution benchmark parameters, and then completing the construction of the time-series smoothness evaluation sub-model. The physical consistency evaluation sub-model construction method includes: building a multi-dimensional physical feature comparison and operation architecture, obtaining corresponding physical features through the preprocessed normal working condition historical dynamometer diagram samples, and statistically analyzing the mean and standard deviation of the physical features in each dimension as a benchmark and storing them, thereby completing the construction of the time series smoothness evaluation sub-model.

[0011] As a preferred embodiment of this application: In step S4, the multidimensional single-item deviation error score includes manifold deviation error. PCA reconstruction error Roughness deviation error and physical consistency error ; The formula for determining the overall non-consistency score is as follows: , in, , , and These are the weights for PCA reconstruction error, manifold deviation error, roughness deviation error, and physical consistency error, respectively.

[0012] As a preferred embodiment of this application: In step S3, the fault prototype library contains multiple types of labeled faults, as well as the prototype center vector, matching radius and physical evidence set corresponding to each type of fault; The prototype center vector is the mean of 30-dimensional features after whitening various faults, obtained dimension by dimension. The matching radius is the distance from all high-dimensional feature vectors of various faults to the corresponding prototype center vector, and is determined by a quantile statistical algorithm. The set of physical evidence includes at least the most significant physical features that distinguish faults from normal operating conditions, the direction of deviation of each physical feature from normal operating conditions, and the judgment threshold obtained by taking the midpoint between the mean of fault-type physical features and the mean of normal operating condition physical features.

[0013] As a preferred embodiment of this application: In step S5, the step of matching and verifying the high-dimensional feature vector set to be tested with the fault prototype library, and then outputting the final fault diagnosis result of the current oil well, includes: Step S51: Traverse the fault prototype library, calculate the distance between each high-dimensional feature vector in the set of high-dimensional feature vectors to be tested and the prototype center vector of each fault type in the whitening feature space, and determine whether the distance is not greater than the matching radius of the corresponding fault type. If yes, collect them into the fault matching candidate set and proceed to step S52; otherwise, proceed to step S54. Step S52: Obtain the physical characteristics of the preprocessed dynamometer diagram sample to be tested, and verify whether the physical characteristics match the physical evidence corresponding to each fault type in the fault candidate set. If yes, proceed to step S53; otherwise, proceed to step S54. Step S53: Determine the number of fault types in the final screening of the fault matching candidate set. If there is only one, output the final fault type directly. If there are multiple, calculate the distance difference ratio between the best candidate and the second best candidate. If the ratio exceeds the ambiguity margin threshold, output the best candidate as the final fault type. Otherwise, proceed to step S54. Step S54: Mark as a new type of unknown fault and trigger manual verification.

[0014] As a preferred embodiment of this application: In step S5, the preset alarm threshold is an adaptive dynamic threshold calculated based on a sliding calibration set that is updated over time and combined with a quantile statistical algorithm. The specific determination method includes: Using the set of comprehensive inconsistencies corresponding to the dynamometer cards recently determined to be under normal operating conditions as the sliding calibration set, the target false alarm rate is set to be... The quantile statistics algorithm is used to calculate the total score of all scores in the sliding calibration set. Quantiles as dynamic alarm thresholds .

[0015] This solution also provides an architecture for a pumping unit fault diagnosis system based on multi-dimensional error fusion manifold features, including: The data acquisition layer is used to collect dynamometer diagram sample data containing timestamps, displacements, and loads. This dynamometer diagram sample data includes historical dynamometer diagram samples under normal operating conditions and historical dynamometer diagram samples under fault conditions. The preprocessing layer is used to preprocess the collected dynamometer card sample data; The model building layer is used to extract multi-dimensional state features corresponding to the preprocessed historical dynamometer diagram samples under normal operating conditions and historical dynamometer diagram samples under fault conditions, and form a normal high-dimensional feature vector set and a fault high-dimensional feature vector set respectively. At the same time, a normal manifold model is constructed based on the normal high-dimensional feature vector set, a fault prototype library is constructed based on the fault high-dimensional feature vector set, and an error evaluation sub-model is constructed based on the preprocessed dynamometer diagram sample data. The decision layer synchronously inputs the high-dimensional feature vector set of the dynamometer diagram sample to be tested into the normal manifold model and the error evaluation sub-model to calculate the multi-dimensional single-item deviation error score. Then, a weighted fusion algorithm is used to generate a comprehensive inconsistency score that represents the degree of deviation of the current oil well operating condition. The comprehensive inconsistency score is compared with a preset alarm threshold. When the operating condition is determined to be abnormal, the high-dimensional feature vector set to be tested is matched and verified with the fault prototype library, and the final fault diagnosis result of the current oil well is output. Feedback Update Layer: When the diagnostic result of the dynamometer diagram sample to be tested is a normal sample, update the historical dynamometer diagram sample set and the sliding calibration set under normal operating conditions. The sliding calibration set is the comprehensive non-consistency score set corresponding to the dynamometer diagrams recently determined to be under normal operating conditions, which is used to dynamically adjust the preset alarm threshold. When the diagnostic result of the dynamometer diagram sample under test is a completely new fault, a new fault prototype is created in the fault prototype library to update the fault prototype library.

[0016] Compared with existing technologies, the advantages of this application are: This invention relies on the constraints of deviation error scores from normal trends and multidimensional evaluations, combined with a fault prototype matching mechanism, to achieve two-stage open-set diagnosis of dynamometer samples under test. This solves the problem that closed-set models cannot adapt to the dynamic fluctuations of oil well operating conditions. It also solves the problem that existing models rely solely on pure data features to determine faults, resulting in diagnostic results without physical basis, poor traceability, and easy mismatches due to similar morphology and contradictory mechanisms. This invention significantly improves the generalization identification capability of rare and major faults, conforms to the characteristics of low-probability and uneven real sample distribution of oilfield faults, meets the risk control needs of oilfield safe production, and eliminates the dependence on massive samples.

[0017] This invention can construct a normal manifold model, an error evaluation sub-model, and a fault prototype library using a limited number of normal operating condition dynamometer diagram samples and fault operating condition dynamometer diagram samples, respectively, without relying on massive samples. Furthermore, by periodically updating the normal operating condition construction drawing sample data and the fault operating condition construction drawing sample data, the normal manifold model, the error evaluation sub-model, and the fault prototype library can be dynamically updated, improving the model's fit with the real-time operating conditions of the oil well and reducing steady-state errors.

[0018] (3) The present invention adopts an open set diagnostic architecture, which breaks through the inherent defects of the traditional closed set classification model in forced classification. The present invention is no longer limited to the fixed fault categories preset in the training set. On the basis of accurately identifying known typical faults, it can effectively identify new composite faults and unlabeled unknown anomalies in the field, avoid the problem of unknown working conditions being forcibly misclassified, effectively adapt to the complex and ever-changing dynamic working conditions of oilfield wells, greatly reduce the fault misdiagnosis rate, and improve the reliability of diagnostic results. Attached Figure Description

[0019] Figure 1 This is a flowchart of the open set diagnosis method for pumping unit faults based on multidimensional error fusion manifold features provided by the present invention.

[0020] Figure 2 The flowchart illustrates the preprocessing and feature extraction method provided by this invention.

[0021] Figure 3 This is a schematic diagram illustrating the principle of using historical dynamometer diagram samples under normal operating conditions to train and construct various models, as provided by the present invention.

[0022] Figure 4 This is a schematic diagram illustrating the principle of constructing a fault prototype library using historical construction drawings of fault conditions, as provided by the present invention.

[0023] Figure 5 This is a schematic diagram of the diagnostic process for the test dynamometer sample stage 1 provided by the present invention.

[0024] Figure 6 The flowchart for the fault prototype matching and verification process provided by this invention.

[0025] Figure 7 The flowchart for the final fault diagnosis output provided by this invention.

[0026] Figure 8 This is a diagram illustrating the architecture of the oil pumping unit fault diagnosis system based on multidimensional error fusion manifold features provided by the present invention. Detailed Implementation

[0027] The present invention will be further described in detail below with reference to specific embodiments and accompanying drawings. It should be emphasized that the following description is merely exemplary and is not intended to limit the scope and application of the present invention.

[0028] Example 1:

[0029] This embodiment provides an open-set diagnosis method for pumping unit faults based on multi-dimensional error fusion manifold features, such as... Figure 1 As shown, it includes the following steps: Step S1: Obtain dynamometer diagram sample data containing timestamps, displacements, and loads. This dynamometer diagram sample data includes historical dynamometer diagram samples under normal operating conditions and historical dynamometer diagram samples under fault conditions, and perform preprocessing operations on them.

[0030] The dynamometer sample data for this step is a sequence of dynamometers collected using existing traditional methods. This sequence should contain multiple single-stroke data, and the construction drawing sequence can be historical data from a single well or historical data from a group of wells with similar sampling conditions or environments. Understandably, the historical dynamometer sample for normal operating conditions is a set of historical dynamometer data from a single well or multiple wells over a period of time, while the historical dynamometer sample for fault operating conditions is a set of historical dynamometer data from a single well or multiple wells over a period of time.

[0031] Step S1, the preprocessing steps for the dynamometer sequence sample, include: Step S11: Divide the dynamometer diagram sequence sample into multiple single-stroke data segments according to the stroke boundary. Each single-stroke data segment contains three columns of collected data: timestamp sequence, displacement sequence, and load sequence collected by the corresponding sensor. It is understood that when the load sequence cannot be directly obtained on site, this embodiment preferably uses a hybrid network of one-dimensional convolution and bidirectional long short-term memory to construct a load prediction sub-model. The collected motor electrical parameters (including current time series and active power time series) are used as the main input, and the operating condition scalars (including static operating condition scalars such as stroke, pump diameter, and well depth) are used as auxiliary inputs. The equivalent load sequence with the same length as the displacement time series is calculated online as the load sequence data.

[0032] Step S12: The lengths of multiple single-stroke data segments are unified by resampling and then normalized.

[0033] Machine learning input requires that each sample has the same dimension; otherwise, it cannot be directly input. Therefore, this embodiment uses resampling to transform each single stroke data segment into a fixed length T. Specifically, depending on the required length, interpolation can be used to reduce or supplement intermediate points to compress or lengthen the sequence. In this embodiment, T is preferably 200 points. When the required length is 200 points, if the original sequence length is 360 points, interpolation is used to compress it to 200 points; if the original sequence length is 159 points, interpolation is used to supplement it to 200 points, ensuring that the final stroke count... The length is uniformly set to 200 points. Finally, amplitude normalization is performed on the stroke data of uniform length. It can be understood that since each stroke data contains a timestamp sequence, a displacement sequence, and a load sequence, the timestamp is used as the reference, and the displacement sequence and load sequence are respectively normalized separately and mapped to the [0, 1] interval to eliminate the influence of the difference in magnitude of different oil well conditions on the subsequent model construction. That is, after the normalization process in this embodiment, each segment of single stroke data yields two sets of equal-length sequences, namely the displacement normalization sequence D=[d0,d1,...,d n-1 ], and the load normalization sequence L=[l0,l1,...l n-1 Furthermore, the displacement normalization sequence D and the load normalization sequence L constitute a dynamometer diagram (a two-dimensional closed curve), which can reflect the geometric shape characteristics of the dynamometer diagram.

[0034] In this embodiment, after preprocessing, the dynamometer sample data is preferably randomized into a test set and a training set, with the training set accounting for 80% and the test set accounting for 20%.

[0035] Step S2: Extract the multi-dimensional state features corresponding to the preprocessed historical dynamometer diagram samples under normal operating conditions and historical dynamometer diagram samples under fault conditions, and form a normal high-dimensional feature vector set and a fault high-dimensional feature vector set respectively.

[0036] In this embodiment, as analyzed above, both the preprocessed historical dynamometer diagram samples under normal operating conditions and those under fault conditions contain multiple two-dimensional closed curves (corresponding to the number of strokes) composed of a displacement normalized sequence D and a load normalized sequence L. These curves can reflect the geometric shape characteristics of the dynamometer diagram. Therefore, in this embodiment, a multidimensional shape feature vector z is extracted from the multiple normalized displacement D-load L sequence pairs, forming a normal high-dimensional feature vector set and a fault high-dimensional feature vector set, respectively. Each high-dimensional feature vector set contains multiple displacement D-load L sequence samples and the corresponding multidimensional state features z. The extracted multidimensional state features include at least: load distribution features, displacement statistical features, dynamometer diagram shape features, physical features, and frequency domain features. In this embodiment, it is preferred to include at least 30 dimensions, specifically including: 9-dimensional load distribution features, specifically including: mean, standard deviation, skewness, kurtosis, and 10% distribution. The system includes: 1) quantile, 25th percentile, 75th percentile, 90th percentile, and interquartile range (interquartile range, the difference between the 75th and 25th percentiles, used to measure the severity of load fluctuations in the middle section); 2) 4) 4D displacement statistical features, including mean, standard deviation, skewness, and kurtosis; 3) 6D dynamometer shape features, including dynamometer area, upstroke area, downstroke area, area asymmetry, dynamometer centroid, and curve perimeter; 4) 5D physical features, including load at minimum displacement, load at maximum displacement, average upstroke load, average downstroke load, and stroke-load ratio; and 6D frequency domain features, including the first five normalized FFT amplitudes and the ratio of the second harmonic to the fundamental frequency amplitude. Specifically, the load time series is converted to the frequency domain using Fast Fourier Transform, the first five harmonic amplitudes are extracted after normalization, and the ratio of the second harmonic amplitude to the fundamental frequency amplitude is calculated. These two features together form the frequency domain feature vector.

[0037] like Figure 2 The diagram shown is a flowchart of the preprocessing and feature extraction process provided in this embodiment.

[0038] Step S3: Simultaneously construct a normal manifold model based on the normal high-dimensional feature vector set, and construct a fault prototype library based on the fault high-dimensional feature vector set; at the same time, construct an error evaluation sub-model based on the preprocessed dynamometer card sample data.

[0039] This step is used to build a model based on the preprocessed dynamometer card sample data, such as... Figure 3 and 4 As shown.

[0040] It should be noted that in this embodiment, when the normal high-dimensional feature vector set is historical data of a single well, only a normal manifold model for a single well is constructed in the normal manifold model component. When the sampled operating conditions or environment are similar, the normal manifold model for the well group is constructed. In this embodiment, it is preferred that the normal high-dimensional feature vector set is historical data of the well group, and the constructed normal manifold model is a normal manifold model for the well group. This model has a large sample size and strong manifold robustness, and can be used especially in situations where there is no historical data for new wells. The block well group model can be directly reused.

[0041] Methods for constructing normal manifold models for single wells or well groups based on normal high-dimensional feature vector sets include: Step S31: Based on the normal high-dimensional feature vector set (including the training set and the test set), calculate the global mean vector and the regularized covariance matrix of the multidimensional feature space.

[0042] Specifically, the input consists of 30-dimensional features within a normal high-dimensional feature vector set. The average value of each 30-dimensional feature corresponding to each displacement D-load L sequence sample is calculated dimension by dimension, resulting in a global mean vector for the multidimensional feature space. This global mean vector represents the center point of the normal operating condition in the 30-dimensional feature space. Simultaneously, a regularized covariance matrix is ​​calculated based on this global mean vector (using existing conventional techniques). This regularized covariance matrix can characterize the diffusion range of the normal dynamometer diagram sample in the 30-dimensional space, as well as the correlation between each feature dimension.

[0043] Step S32: The distribution region of the multidimensional state feature vector under normal operating conditions in high-dimensional space is characterized by the global mean vector and the regularized covariance matrix, thereby completing the construction of the normal manifold model in single Gaussian form.

[0044] Specifically, in this embodiment, the global mean vector is used as the center, and the regularized covariance matrix is ​​used to characterize the discrete range of the 30-dimensional features, which together form a multivariate single Gaussian distribution. The spatial region covered by this Gaussian distribution is the manifold region of the well group or the well under normal operating conditions. In subsequent inference, the Mahalanobis distance of the dynamometer card sample to be tested can be calculated using the global mean vector and the regularized covariance matrix. This Mahalanobis distance is also called the manifold deviation error. The larger the Mahalanobis distance, the more serious the deviation of the test dynamometer sample from the normal manifold region. In other words, subsequent inference can reflect the degree of correlation between the test dynamometer sample and the normal manifold region by judging the size of the Mahalanobis distance.

[0045] In this embodiment, the historical dynamometer diagram sample of the fault condition can be the historical fault data of a single oil well or the historical fault data of a well group. In this embodiment, the historical fault data of a well group is preferred.

[0046] The fault prototype library contains multiple types of labeled faults, along with the prototype center vector, matching radius, and physical evidence set for each type of fault. Specifically, the fault condition historical indicator diagram sample contains fault categories with various known fault causes, and each fault category is labeled. In this embodiment, the preferred fault categories include: insufficient liquid supply (A02), gas influence (A03), air lock (A04), upper pump collision (A05), lower pump collision (A06), slow closing of the traveling valve (A07), plunger disengagement from the pump working cylinder (A08), traveling valve leakage (A09), fixed valve leakage (A10), and sand influence (A11). Insufficient fluid supply, inertial influence of type A12 + normal operation; all training samples for each type of fault are labeled, and 30-dimensional state feature vectors for each type of fault are uniformly extracted to form a feature set specific to each type of fault; then, based on the global standard score (Z-score) whitening standard of the normal operating condition dynamometer diagram samples, a uniform whitening transformation (subtracting the normal mean and dividing by the normal standard deviation) is performed on the multi-dimensional original features of the normal operating condition dynamometer diagram samples and the fault operating condition dynamometer diagram samples to map all samples to the same standardized whitening feature space and eliminate the difference in calculation of different feature numerical scales; finally, the prototype center vector c_k of any type of fault from A02 to A012 is solved. The matching radius r_k and the set of physical evidence are defined, where the prototype center vector c_k is the mean of the 30-dimensional whitened feature vectors corresponding to each fault type, calculated dimension by dimension. It can be understood that each fault type may correspond to multiple samples, and each sample contains 30-dimensional whitened features. Therefore, the prototype center vector c_k is the set of feature means from multiple samples and serves as the spatial morphological benchmark for that fault type. The matching radius r_k is taken as the 95th quantile of the whitened distance from in-class samples to the prototype center vector c_k. Specifically, the whitened spatial distance from each whitened feature vector within each fault type to the prototype center vector c_k of that type is calculated, and the 95th quantile of all in-class distances is taken. The quantile value is set as the matching radius r_k within the class. This rule can ensure that 95% of the training samples are within the matching radius of their respective prototypes. The physical evidence set is automatically generated by statistically analyzing the distribution patterns of physical characteristics corresponding to various faults and using a data-driven approach. Specifically, based on the load time series, displacement time series, and pumping unit mechanical model of the dynamometer diagram, the physical characteristics corresponding to each fault type in the fault condition dynamometer diagram samples and the physical characteristics corresponding to the normal condition dynamometer diagram samples are statistically analyzed. These physical characteristics may specifically include pump filling degree, work done in a single stroke of the polished rod, maximum load, minimum load, effective stroke, and other pumping unit mechanical parameters.Calculate the mean difference between the corresponding features of each fault type and normal samples, sort them by deviation magnitude, and select the top 2-5 physical features with the highest discrimination (most significantly distinguishing faults from normal operating conditions). Record the deviation direction (higher or lower) of the features relative to normal operating conditions. At the same time, take the midpoint of the mean of each physical feature of the fault type and normal samples as the judgment threshold of that physical feature. Encapsulate the selected 2-5 physical features, deviation direction, and midpoint threshold into a physical evidence set physics for the fault. k This is then bound and stored with the prototype center c_k and matching radius r_k. At this point, the fault prototype library is complete. This library consists of historically known fault types and serves as the benchmark for subsequent open-set diagnosis. Figure 4 As shown.

[0047] In this embodiment, the error evaluation sub-model includes at least the PCA reconstruction evaluation sub-model, the temporal smoothness evaluation sub-model, and the physical consistency evaluation sub-model. These three sets of models can supplement the calculation of individual errors from three dimensions: temporal waveform, curve roughness, and physical mechanism. They are combined with Mahalanobis distance (manifold deviation error) to form a multi-dimensional error evaluation index, which overcomes the defects of single-dimensional diagnosis such as missed judgment and misjudgment.

[0048] The PCA reconstruction evaluation sub-model construction method includes: building a principal component analysis (PCA) reconstruction operation architecture; fitting the principal component analysis transformation matrix based on the load data in the preprocessed historical dynamometer diagram samples under normal operating conditions; retaining the first k principal components to form a projection and reconstruction mapping relationship (preferably k <= 20 in this embodiment); and storing the projection matrix and reconstruction mapping matrix to complete the construction of the PCA reconstruction evaluation sub-model.

[0049] Specifically, this PCA reconstruction evaluation sub-model learns from preprocessed load sequence samples under normal operating conditions (this process does not require extraction of multidimensional state features) to form a dedicated low-dimensional space composed of k principal components. In subsequent inference, the model first projects the preprocessed load sequence samples to be tested and then restores them. The difference between the original and reconstructed sequences is the PCA reconstruction error S. recon The PCA reconstruction error S recon It can be used as a deviation evaluation index to quantify waveform distortion.

[0050] The method for constructing a time-series smoothness evaluation sub-model includes: building a roughness calculation architecture based on the second-order difference mean square value of time series, calculating the time-series roughness corresponding to the load data in the historical dynamometer diagram samples under normal working conditions, statistically analyzing and storing the roughness distribution benchmark parameters, and then completing the construction of the time-series smoothness evaluation sub-model.

[0051] Specifically, the roughness calculation architecture learns from preprocessed load sequence samples under normal operating conditions (this process does not require extraction of multidimensional state features) and statistically analyzes the overall distribution of roughness R of all normal samples based on a time-series fluctuation quantization algorithm. Using the roughness R of the normal samples as a basis, it solves for three types of distribution quantization indices, including mean, variance, and quantiles. The mean characterizes the baseline level of normal roughness, the variance characterizes the fluctuation range of roughness under normal operating conditions, and the upper quantile defines the upper limit of tolerable roughness under normal operating conditions. Remembering this allowable roughness range under normal operating conditions, in subsequent inference, the model first calculates the roughness of the preprocessed load sample sequence and then compares it with the allowable roughness range under normal operating conditions to obtain a time-series error score. When the load fluctuates frequently, experiences impacts, or undergoes drastic changes, this time-series error score will significantly increase; that is, the time-series smoothness evaluation sub-model can output the roughness deviation error between the tested dynamometer sample and the allowable roughness range under normal operating conditions. .

[0052] The physical consistency evaluation sub-model construction method includes: building a multi-dimensional physical feature comparison and operation architecture, obtaining corresponding physical features through preprocessed historical dynamometer diagram samples under normal working conditions, and statistically analyzing the mean and standard deviation of each physical feature as a benchmark and storing them, thereby completing the construction of the physical consistency evaluation sub-model.

[0053] This embodiment uses the various physical mechanism features calculated from the displacement and load time series after resampling and normalization preprocessing as input. Specifically, the preprocessed historical dynamometer diagram sample under normal operating conditions contains multiple single strokes. Engineering physics calculations (based on the load time series, displacement time series, and statistical calculations of the pumping unit mechanical model based on the dynamometer diagram) are performed on a set of aligned displacement and load sequences for each single stroke. This yields multiple independent scalar parameters, collectively referred to as physical features, such as: effective work done in a single stroke; load difference between upper and lower strokes, maximum load, minimum load; hysteresis loss area, pump fullness; effective plunger stroke, stroke conversion parameters, and other mechanical parameters. The physical features of multiple single strokes constitute the physical feature set of the test sample. Then, the mean and standard deviation of each physical feature are calculated and stored as a benchmark. These mean and standard deviation are used to define the normal distribution range of the physical indicators. In the subsequent inference stage, the physical consistency error can be obtained based on the standard score comparison rules. Specifically, each physical characteristic of the preprocessed dynamometer card sample is solved separately, and the standard score corresponding to each physical characteristic is calculated based on the standard score comparison rule. The standard scores that approach the normal distribution are truncated and assigned a value of 0. The average value of all truncated standard scores is then calculated to obtain the physical consistency error, which characterizes the degree to which the physical characteristics deviate from the normal distribution. The physical consistency error S_physics, as an evaluation index, can determine the degree to which the physical indicators of the dynamometer sample deviate from the normal range.

[0054] As can be seen, in addition to constructing a normal manifold model, this embodiment also constructs three independent evaluation sub-models, which are uniformly trained using historical normal dynamometer data of a single well or well group. During the inference phase, it can simultaneously output individual errors from four dimensions: manifold deviation, waveform distortion, time series impact, and physical parameter deviation.

[0055] Furthermore, this embodiment adopts an open-set diagnostic architecture, which can construct the normal manifold model, error evaluation sub-model, and fault prototype library using a limited number of normal operating condition indicator diagram samples and fault operating condition indicator diagram samples, respectively. It does not rely on a massive number of normal and fault samples, thus solving the drawback of the existing traditional closed-set mode which requires a large number of fault samples to train the model.

[0056] Step S4: Process the dynamometer card sample to be tested in the same way as in steps S1 and S2 to obtain the high-dimensional feature vector set to be tested. Input the high-dimensional feature vector set to be tested into the normal manifold model. Input the dynamometer card sample to be tested after preprocessing in step S1 into the error evaluation sub-model to calculate the multi-dimensional single-item deviation error score. Use the weighted fusion algorithm to generate a comprehensive inconsistency score that characterizes the degree of deviation of the current oil well operating condition.

[0057] In this embodiment, the dynamometer diagram sequence sample of the oil well to be tested is obtained. It can be understood that the dynamometer diagram sequence sample is the data output by a single oil well to be tested, not the mixed data of multiple oil wells. The dynamometer diagram sequence sample to be tested is first preprocessed by the resampling and normalization method in step 1, and then the 30-dimensional state features of the displacement D-load L sequence are obtained by the same method in step S2 to form the high-dimensional feature vector set to be tested.

[0058] In this embodiment, the normal manifold model is preferably a well cluster normal flow model. Of course, if necessary, a single-well normal flow model can also be used. This normal manifold model is used to characterize the normal distribution region of normal high-dimensional eigenvectors in the high-dimensional feature space, and can be used to calculate the manifold deviation error. In other words, Mahalanobis distance is used to analyze the deviation of the test dynamometer sample from the normal region. At the same time, each error evaluation sub-model can output the PCA reconstruction error by processing the preprocessed test dynamometer sample sequence. Roughness deviation error and physical consistency error Furthermore, the single-item deviation error of the dynamometer card sample relative to the normal operating condition is calculated from three dimensions: waveform distortion, timing impact, and deviation of physical parameters. In this embodiment, the manifold deviation error output by the normal manifold model is used. By integrating the multidimensional deviation error scores output by each evaluation sub-model, a multidimensional comprehensive evaluation system is formed, overcoming the shortcomings of single-dimensional diagnosis such as missed judgments and misjudgments.

[0059] In this embodiment, the acquired high-dimensional feature vector set to be tested is used as the input to the normal manifold model. Simultaneously, the load sequence from the preprocessed dynamometer card sample to be tested is used as input, and is synchronously input into the PCA reconstruction evaluation sub-model and the temporal smoothness evaluation sub-model. Furthermore, the physical features acquired from the preprocessed dynamometer card sample to be tested are used as input, and are input into the physical consistency evaluation sub-model. Then, each model outputs the manifold deviation error. PCA reconstruction error Roughness deviation error and physical consistency error In this embodiment, the specific calculation method for each of the above deviations is explained in the model construction section of step S3 above, so it will not be described in detail here.

[0060] In this embodiment, the formula for determining the overall non-consistency score is: , in, , , and The weights for PCA reconstruction error, manifold deviation error, roughness deviation error, and physical consistency error are respectively given in this embodiment. , and The value is 0.20. The value is 0.40.

[0061] Step S5: Compare the overall inconsistency score with the preset alarm threshold. When the working condition is determined to be abnormal, match and verify the high-dimensional feature vector set to be tested with the fault prototype library, and output the final fault diagnosis result of the current oil well.

[0062] In this embodiment, the comprehensive inconsistency score S is compared with a preset alarm threshold tau. If S does not exceed tau, the dynamometer card sample under test is determined to be normal, and a normal diagnostic result is output. Simultaneously, the historical dynamometer card sample set under normal operating conditions is updated. This updated historical dynamometer card sample set under normal operating conditions is used to periodically update the normal manifold model and the error evaluation sub-model. If S exceeds tau, an anomaly is determined, and the process enters the fault prototype matching and verification stage. This determination stage is the primary diagnostic stage for the dynamometer card sample under test, also known as Stage 1 diagnosis. Figure 5 As shown.

[0063] This embodiment relies on the multi-dimensional comprehensive evaluation score S formed by the fusion of normal flow and multi-dimensional evaluation deviation error score. It determines the overall deviation of the test dynamometer sample from the normal operating condition fluctuation range from four dimensions: curve shape, waveform distortion, load impact, and mechanical parameters, and completes the stage 1 diagnosis of the test dynamometer sample.

[0064] In this embodiment, it should be noted that the fault prototype matching and verification stage is a two-stage diagnosis of the dynamometer diagram sample to be tested. This stage requires whitening the high-temperature feature vector to be tested so that it is in the same dimension and feature space as the whitened prototype in the fault prototype library, ensuring that the distance calculation results are comparable. The specific whitening process includes: retrieving the feature mean and standard deviation of the 30-dimensional high-dimensional features of the normal operating condition (as the whitening benchmark), and performing a dimensional standard transformation on the high-temperature feature vector to be tested to obtain the whitened 30-dimensional high-dimensional feature vector set.

[0065] The high-dimensional feature vector set to be tested is matched and verified against the fault prototype library, and the final fault diagnosis result of the current oil well is output based on the matching and verification results. Figure 6 As shown, the specific steps include: Step S51: Traverse the fault prototype library, calculate the distance d_k between each high-dimensional feature vector in the set of high-dimensional feature vectors to be tested and the prototype center vector of each fault type in the whitened feature space, and determine whether the distance d_k is not greater than the matching radius c_k of the corresponding fault type. If yes, collect them into the fault matching candidate set and proceed to step S52; otherwise, proceed to step S54.

[0066] In this embodiment, the distance d_k between the high-dimensional feature vector to be tested and the prototype center vector c_k corresponding to the current fault type in the whitening space is calculated dimension by dimension. It is then determined whether the distance d_k is not greater than the matching radius r_k corresponding to the current fault type. If so, it indicates that the feature vector is abnormal and is included in the fault matching candidate set. If not, the fault prototype library is traversed again, and the distance d_k between the current high-dimensional feature vector to be tested and the prototype center vector c_k corresponding to the next fault type in the whitening space is calculated. This process continues until all fault types have been traversed. If the whitening space distance d_k is always greater than the corresponding fault matching radius r_k, it indicates that the high-dimensional feature vector does not match any fault type in the fault prototype library. At this point, the fault type needs to be manually checked, and therefore, the process proceeds to step S54.

[0067] Step S52: Obtain the physical characteristics of the preprocessed dynamometer diagram sample to be tested, and verify whether the physical characteristics match the physical evidence corresponding to each fault type in the fault candidate set. If yes, proceed to step S53; otherwise, proceed to step S54.

[0068] In this embodiment, the method for obtaining the physical characteristics of the dynamometer card sample to be tested is the same as that in the construction of the physical consistency evaluation sub-model described above, and will not be described in detail here. The obtained physical characteristics are checked against the physical evidence corresponding to each fault type in the fault candidate set to verify whether the key physical characteristics of the dynamometer card sample to be tested are biased towards the expected direction of this type of fault, and the candidates in the fault matching candidate set C_valid whose physical evidence does not match are filtered. If the key physical characteristics of the dynamometer card sample to be tested match the physical evidence corresponding to a certain fault type, it means that the current dynamometer card sample to be tested is abnormally of the existing known fault type, and proceeds to step S53. If not, it means that the fault is an unknown fault and needs to be manually checked, and proceeds to step S54.

[0069] Step S53: Determine the number of fault types in the final selection of the fault matching candidate set. If there is only one, directly output the final fault type. If there are multiple, calculate the distance difference ratio between the best candidate and the second-best candidate. If this ratio exceeds the ambiguity margin threshold, output the best candidate as the final fault type; otherwise, proceed to step S54, as detailed below. Figure 7 As shown.

[0070] In this embodiment, the comparison of the matching radius r_k can only filter whether the dynamometer card sample resembles a certain type of fault. However, for cases with more than two candidate fault types, it cannot distinguish confused samples that resemble both types of faults simultaneously. To address this, this embodiment introduces an ambiguity margin threshold, which can identify ambiguous operating conditions with overlapping fault morphologies (a fixed parameter calibrated manually, preferably 0.2). Specifically, in use, the distance difference ratio between the best candidate and the second-best candidate is calculated: ,in, As the optimal candidate, As the second-best candidate, when the distance difference ratio When the distance difference ratio exceeds the ambiguity margin threshold, it indicates clear distinction and no ambiguity. In this case, the optimal candidate is output as the final fault type. If the value is less than the ambiguity margin threshold, it indicates that there is ambiguity and further verification is required. Proceed to step S54.

[0071] Step S54: Mark as a new type of unknown fault and trigger manual verification.

[0072] After completing the manual verification, this step generates a new fault prototype and adds it to the fault prototype library. At the same time, it updates the historical dynamometer diagram samples of the fault conditions. As can be seen, the fault prototype library in this embodiment is dynamically updated, providing a richer and more comprehensive reference prototype for subsequent fault diagnosis.

[0073] In this embodiment, the preset alarm threshold in step S5 is an adaptive dynamic threshold tau calculated based on a sliding calibration set that is updated on a rolling basis and a quantile statistics algorithm. The specific determination method includes: Using the set of comprehensive inconsistencies corresponding to the dynamometer cards recently determined to be under normal operating conditions as the sliding calibration set, the target false alarm rate is set to be... The quantile statistics algorithm is used to calculate all scores within the sliding calibration set. Quantiles as dynamic alarm thresholds , The quantile is used as the decision boundary, and the specific formula is as follows: ({Si∣i∈calibration set}), where the default value of α is 0.05.

[0074] Specifically, after completing the diagnosis of the dynamometer card sample to be tested, the comprehensive non-consistency score S corresponding to the dynamometer card that was recently determined to be in normal operating condition is added to the sliding calibration set. The default upper limit of the sliding calibration set is 2000 records. When it exceeds this limit, it is updated according to the first-in-first-out strategy. In this embodiment, it is preferred to update it once every 7 days. Compared with a fixed threshold, since the sliding calibration set continuously incorporates the latest normal data, the alarm threshold can adaptively track the drift of oil well operating conditions (such as fluid level drop, early stage of pump wear, seasonal temperature changes, etc.), avoiding the risk of uncontrolled false alarm rate or missed alarm caused by a fixed threshold.

[0075] As can be seen, the fault prototype matching and verification process in this embodiment adopts a two-level open-set verification mode. Specifically, the first level achieves coarse matching of the morphological similarity of the dynamometer diagram samples to be tested through high-dimensional feature whitening spatial distance matching, that is, first screening by shape. The second level combines the pumping unit-specific physical feature constraints such as pump fullness, pump work, and load loss to complete the physical mechanism verification, thereby filtering out erroneous matching results with similar shapes and contradictory physical mechanisms, eliminating blind judgment driven by pure data, and ensuring that the diagnostic process is supported by both data and physical mechanisms. At the same time, the dual constraints reduce the problems of misidentification and omission in the open-set scenario. In addition, the open-set diagnosis adopted in this embodiment can not only identify known faults in the fault prototype library, but also distinguish unknown anomalies that do not belong to any fault prototype, solving the problem of misclassification of unknown faults in the traditional closed-set mode.

[0076] In summary, the analysis shows that this solution adopts an open-set diagnostic architecture, which overcomes the inherent defects of traditional closed-set classification models that force classification. It is no longer limited to the fixed fault categories preset in the training set. On the basis of accurately identifying known typical faults, it can effectively identify new composite faults and unlabeled unknown anomalies in the field, avoiding the problem of unknown working conditions being forcibly misclassified. It effectively adapts to the complex and ever-changing dynamic working conditions in oilfields, significantly reducing the fault misdiagnosis rate and improving the reliability of diagnostic results. At the same time, relying on the constraints of normal prevalence and multi-dimensional evaluation deviation error scores, combined with the fault prototype matching mechanism, this solution can solve the problems of existing models relying solely on pure data features to determine faults, resulting in diagnostic results without physical basis, poor traceability, and easy mismatches due to similar morphology and contradictory mechanisms. It significantly improves the generalization identification ability of rare and major faults, which is in line with the characteristics of low probability and uneven real sample distribution of faults in oilfields, meets the needs of oilfield safety production risk control, and abandons the dependence on massive samples.

[0077] Example 2:

[0078] This solution also provides an architecture for a pumping unit fault diagnosis system based on multi-dimensional error fusion manifold features, such as... Figure 8 As shown, the system architecture includes: The data acquisition layer is used to collect dynamometer diagram sample data containing timestamps, displacements, and loads. This dynamometer diagram sample data includes historical dynamometer diagram samples under normal operating conditions and historical dynamometer diagram samples under fault conditions.

[0079] In this embodiment, the dynamometer sample data is a sequence of dynamometers collected using existing traditional methods. This sequence of dynamometers can be a historical dataset of a single well or a historical dataset of a group of wells with similar sampling conditions or environments. It can be understood that the historical dynamometer sample under normal operating conditions is a set of historical dynamometer data of a single well or multiple wells under normal operating conditions over a period of time, and the historical dynamometer sample under fault conditions is a set of historical dynamometer data of a single well or multiple wells under fault conditions over a period of time.

[0080] The preprocessing layer is used to preprocess the collected dynamometer diagram sample data. The preprocessing of the dynamometer diagram sequence sample includes resampling and normalization. The specific steps are the same as in Embodiment 1 above, and will not be described in detail here.

[0081] The model construction layer is used to extract multi-dimensional state features corresponding to the preprocessed historical dynamometer diagram samples under normal operating conditions and historical dynamometer diagram samples under fault conditions, and form normal high-dimensional feature vector sets and fault high-dimensional feature vector sets respectively. At the same time, a normal manifold model is constructed based on the normal high-dimensional feature vector set, a fault prototype library is constructed based on the fault high-dimensional feature vector set, and an error evaluation sub-model is constructed based on the preprocessed dynamometer diagram sample data.

[0082] In this embodiment, the model construction layer is used to construct a normal manifold model, a fault prototype library, and an error evaluation sub-model using the normal operating condition historical dynamometer diagram samples and fault operating condition historical dynamometer diagram samples processed by the preprocessing layer.

[0083] The specific processing procedure is synchronized with steps S2 and S3 of the open set diagnosis method in Embodiment 1 above. Therefore, this embodiment does not provide a detailed description of the specific component method.

[0084] The decision layer synchronously inputs the high-dimensional feature vector set of the dynamometer diagram sample to the normal manifold model and the error evaluation sub-model to calculate the multi-dimensional single-item deviation error score. Then, a weighted fusion algorithm is used to generate a comprehensive inconsistency score that represents the degree of deviation of the current oil well operating condition. The comprehensive inconsistency score is compared with a preset alarm threshold. When the operating condition is determined to be abnormal, the high-dimensional feature vector set to be tested is matched and verified with the fault prototype library, and the final fault diagnosis result of the current oil well is output.

[0085] In this embodiment, the decision layer executes a two-stage open set diagnostic mode, wherein stage 1 will include manifold deviation error. PCA reconstruction error Roughness deviation error and physical consistency error The multidimensional single-item deviation error scores are weighted and fused to form a comprehensive non-consistency score S. By comparing S with the preset alarm threshold tau, abnormal risk identification can be achieved. Specifically, when S does not exceed tau, the dynamometer card sample under test is determined to be normal, and a normal diagnosis result is output. At the same time, the historical dynamometer card sample set under normal operating conditions is updated. The normal manifold model and error evaluation sub-model are periodically updated through this updated historical dynamometer card sample set under normal operating conditions. If S exceeds tau, the dynamometer card sample under test is determined to be abnormal, and the process enters the fault prototype matching and verification stage 2. This stage 2 adopts a two-level open set verification mode and coordinates with the fault prototype library matching mechanism to diagnose the specific fault type to which the abnormality belongs. Specifically, the first level uses high-dimensional feature whitening spatial distance. The matching process achieves a coarse matching of the morphological similarity of the dynamometer diagram samples to be tested, that is, first screening by shape. The second level combines the physical characteristics of the pumping unit, such as pump fullness, pump work, and load loss, to complete the physical mechanism verification, thereby filtering out erroneous matching results with similar shapes and contradictory physical mechanisms, and eliminating blind judgment driven by pure data. The diagnostic process is supported by both data and physical mechanisms. At the same time, the dual constraints reduce the problems of misidentification and omission in open set scenarios. In addition, this embodiment adopts open set diagnosis, which can identify known faults in the fault prototype library and distinguish unknown anomalies that do not belong to any fault prototype. When it does not match any fault type in the fault prototype library, there is no need to force classification and start manual verification, which solves the problem of misclassification of unknown faults in the traditional closed set mode.

[0086] In this decision-making layer, the preset alarm threshold tau is an adaptive dynamic threshold calculated based on a sliding calibration set that is updated over time, combined with a quantile statistical algorithm. The sliding calibration set is the comprehensive inconsistency score set corresponding to the dynamometer cards that were recently determined to be in normal operating condition. In the quantile statistical algorithm, the target false alarm rate α is set to 0.05 by default. The quantile is used as the judgment boundary, and then the alarm threshold tau is dynamically determined.

[0087] In this embodiment, the specific method executed by the decision layer is the same as steps S4 and S5 of the open set diagnosis method in Embodiment 1 above, and will not be described in detail here.

[0088] Feedback Update Layer: When the diagnostic result of the dynamometer diagram sample to be tested is a normal sample, the historical dynamometer diagram sample set under normal operating conditions and the sliding calibration set are updated. The sliding calibration set is the comprehensive non-consistency score set corresponding to the dynamometer diagrams recently determined to be under normal operating conditions, which is used to dynamically adjust the preset alarm threshold.

[0089] In this embodiment, the normal manifold model, error evaluation model, and calibration dynamic threshold are preferably updated using historical operating data for 7 consecutive days; when switching wells in the future, only the normal manifold model can be rebuilt.

[0090] When the diagnostic result of the dynamometer diagram sample to be tested is a completely new fault, a new fault prototype is created in the fault prototype library. At the same time, the historical dynamometer diagram samples of the fault condition are updated. It can be seen that the fault prototype library in this embodiment is dynamically updated, providing richer and more comprehensive reference prototypes for subsequent fault diagnosis.

[0091] The above descriptions are merely embodiments of the present invention, and common knowledge regarding specific structures and characteristics in the solutions has not been elaborated upon here. It should be noted that those skilled in the art can make various modifications without departing from the present invention, and these modifications should also be considered within the scope of protection of the present invention. These modifications will not affect the effectiveness of the implementation of the present invention or the practicality of the patent. The scope of protection claimed in this application should be determined by the content of the claims, and the specific embodiments described in the specification can be used to interpret the content of the claims.

Claims

1. A method for open-set diagnosis of pumping unit faults based on multidimensional error fusion manifold features, characterized in that: Includes the following steps: Step S1: Obtain dynamometer diagram sample data containing timestamps, displacements, and loads. This dynamometer diagram sample data includes historical dynamometer diagram samples under normal operating conditions and historical dynamometer diagram samples under fault conditions, and perform preprocessing operations on them. Step S2: Extract the multi-dimensional state features corresponding to the preprocessed historical dynamometer diagram samples under normal operating conditions and historical dynamometer diagram samples under fault conditions, and form a normal high-dimensional feature vector set and a fault high-dimensional feature vector set respectively. Step S3: Construct a normal manifold model for a single well and / or a well group based on the normal high-dimensional feature vector set, and construct a fault prototype library based on the fault high-dimensional feature vector set; simultaneously, construct an error evaluation sub-model based on the preprocessed dynamometer card sample data. Step S4: Process the dynamometer card sample to be tested in the same way as in steps S1 and S2 to obtain the high-dimensional feature vector set to be tested. Input the high-dimensional feature vector set to be tested into the normal manifold model. Input the preprocessed dynamometer card sample to be tested into the error evaluation sub-model to calculate the multi-dimensional single-item deviation error score. Then, use a weighted fusion algorithm to generate a comprehensive inconsistency score that characterizes the degree of deviation of the current oil well operating condition. Step S5: Compare the comprehensive inconsistency score with the preset alarm threshold. When the working condition is determined to be abnormal, match and verify the high-dimensional feature vector set to be tested with the fault prototype library, and output the final fault diagnosis result of the current oil well. In Step S3, the fault prototype library contains multiple types of labeled faults, as well as the prototype center vector, matching radius and physical evidence set corresponding to each type of fault. The prototype center vector is the mean of 30-dimensional features after whitening various faults, obtained dimension by dimension. The matching radius is the distance from all high-dimensional feature vectors of various faults to the corresponding prototype center vector, and is determined by a quantile statistical algorithm. The set of physical evidence includes at least the most significant physical features that distinguish faults from normal operating conditions, the direction of deviation of each physical feature from normal operating conditions, and the judgment threshold obtained by taking the midpoint between the mean of physical features of faults and the mean of physical features of normal operating conditions. In step S5, the process of matching and verifying the high-dimensional feature vector set to be tested with the fault prototype library, and then outputting the final fault diagnosis result of the current oil well, includes: Step S51: Traverse the fault prototype library, calculate the distance between each high-dimensional feature vector in the set of high-dimensional feature vectors to be tested and the prototype center vector of each fault type in the whitening feature space, and determine whether the distance is not greater than the matching radius of the corresponding fault type. If yes, collect them into the fault matching candidate set and proceed to step S52; otherwise, proceed to step S54. Step S52: Obtain the physical characteristics of the preprocessed dynamometer diagram sample to be tested, and verify whether the physical characteristics match the physical evidence corresponding to each fault type in the fault matching candidate set. If yes, proceed to step S53; otherwise, proceed to step S54. Step S53: Determine the number of fault types in the final screening of the fault matching candidate set. If there is only one, output the final fault type directly. If there are multiple, calculate the distance difference ratio between the best candidate and the second best candidate. If the ratio exceeds the ambiguity margin threshold, output the best candidate as the final fault type. Otherwise, proceed to step S54. Step S54: Mark as a new type of unknown fault and trigger manual verification.

2. The method for open-set diagnosis of pumping unit faults based on multidimensional error fusion manifold features according to claim 1, characterized in that: The indicator diagram sample data is an indicator diagram sequence sample. Step S1, which involves preprocessing the indicator diagram sequence sample, includes: Step S11: Divide the indicator diagram sequence sample into multiple segments of single-stroke data according to the stroke boundary; Step S12: The lengths of the multiple segments of single-stroke data are unified by resampling and then normalized.

3. The method for open-set diagnosis of pumping unit faults based on multidimensional error fusion manifold features according to claim 1, characterized in that: In step S2, the extracted multidimensional state features include at least: load distribution features, displacement statistics features, dynamometer shape features, physical features, and frequency domain features.

4. The method for open-set diagnosis of pumping unit faults based on multidimensional error fusion manifold features according to claim 1, characterized in that: In step S3, the method for constructing a normal manifold model for a single well and / or a well group based on a normal high-dimensional feature vector set includes: Step S31: Based on the normal high-dimensional feature vector set, calculate the global mean vector and regularized covariance matrix of the multidimensional feature space; Step S32: The distribution region of the multidimensional state feature vector under normal operating conditions in high-dimensional space is characterized by the global mean vector and the regularized covariance matrix, thereby completing the construction of the normal manifold model.

5. The method for open-set diagnosis of pumping unit faults based on multidimensional error fusion manifold features according to claim 1, characterized in that: In step S3, the error evaluation sub-model includes at least a PCA reconstruction evaluation sub-model, a temporal smoothness evaluation sub-model, and a physical consistency evaluation sub-model; The PCA reconstruction evaluation sub-model construction method includes: building a principal component analysis reconstruction operation architecture, fitting a principal component analysis transformation matrix based on the load data in the preprocessed historical dynamometer diagram sample of the normal working condition, retaining the first k principal components to form a projection and reconstruction mapping relationship, and storing the projection matrix and reconstruction mapping matrix, thereby completing the construction of the PCA reconstruction evaluation sub-model. The method for constructing the time-series smoothness evaluation sub-model includes: building a roughness calculation architecture based on the second-order difference mean square value of time series, calculating the time-series roughness corresponding to the load data in the historical dynamometer diagram sample of the normal working condition, statistically analyzing and storing the roughness distribution benchmark parameters, and then completing the construction of the time-series smoothness evaluation sub-model. The physical consistency evaluation sub-model construction method includes: building a multi-dimensional physical feature comparison and operation architecture, obtaining corresponding physical features through the preprocessed normal working condition historical dynamometer diagram samples, and statistically analyzing the mean and standard deviation of the physical features dimension by dimension as a benchmark and storing them, thereby completing the construction of the physical consistency evaluation sub-model.

6. The method for open-set diagnosis of pumping unit faults based on multidimensional error fusion manifold features according to claim 5, characterized in that: In step S4, the multidimensional single-item deviation error score includes manifold deviation error. PCA reconstruction error Roughness deviation error and physical consistency error ; The formula for determining the overall non-consistency score is as follows: , in, , , and These are the weights for PCA reconstruction error, manifold deviation error, roughness deviation error, and physical consistency error, respectively.

7. The method for open-set diagnosis of pumping unit faults based on multidimensional error fusion manifold features according to claim 1, characterized in that: In step S5, the preset alarm threshold is an adaptive dynamic threshold calculated based on a sliding calibration set that is updated over time and combined with a quantile statistics algorithm. The specific determination method includes: Using the set of comprehensive inconsistencies corresponding to the dynamometer cards recently determined to be under normal operating conditions as the sliding calibration set, the target false alarm rate is set to be... The quantile statistics algorithm is used to calculate the total score of all scores in the sliding calibration set. Quantiles as dynamic alarm thresholds .

8. A fault diagnosis system architecture for oil pumping units based on multidimensional error fusion manifold features, characterized in that: include: The data acquisition layer is used to collect dynamometer diagram sample data containing timestamps, displacements, and loads. This dynamometer diagram sample data includes historical dynamometer diagram samples under normal operating conditions and historical dynamometer diagram samples under fault conditions. The preprocessing layer is used to preprocess the collected dynamometer card sample data; The model building layer is used to extract multi-dimensional state features corresponding to the preprocessed historical dynamometer diagram samples under normal operating conditions and historical dynamometer diagram samples under fault conditions, and form a normal high-dimensional feature vector set and a fault high-dimensional feature vector set respectively. At the same time, a normal manifold model is constructed based on the normal high-dimensional feature vector set, a fault prototype library is constructed based on the fault high-dimensional feature vector set, and an error evaluation sub-model is constructed based on the preprocessed dynamometer diagram sample data. The decision layer synchronously inputs the high-dimensional feature vector set of the dynamometer card sample to be tested into the normal manifold model and the error evaluation sub-model to calculate the multi-dimensional single-item deviation error score. Then, a weighted fusion algorithm is used to generate a comprehensive inconsistency score that represents the degree of deviation of the current oil well operating condition. The comprehensive inconsistency score is compared with a preset alarm threshold. When the operating condition is determined to be abnormal, the high-dimensional feature vector set of the dynamometer card sample to be tested is matched and verified with the fault prototype library, and the final fault diagnosis result of the current oil well is output. The steps involved in matching and verifying the high-dimensional feature vector set to be tested against the fault prototype library, and then outputting the final fault diagnosis result for the current oil well, include: Step S51: Traverse the fault prototype library, calculate the distance between each high-dimensional feature vector in the set of high-dimensional feature vectors to be tested and the prototype center vector of each fault type in the whitening feature space, and determine whether the distance is not greater than the matching radius of the corresponding fault type. If yes, collect them into the fault matching candidate set and proceed to step S52; otherwise, proceed to step S54. Step S52: Obtain the physical characteristics of the preprocessed dynamometer diagram sample to be tested, and verify whether the physical characteristics match the physical evidence corresponding to each fault type in the fault matching candidate set. If yes, proceed to step S53; otherwise, proceed to step S54. Step S53: Determine the number of fault types in the final screening of the fault matching candidate set. If there is only one, output the final fault type directly. If there are multiple, calculate the distance difference ratio between the best candidate and the second best candidate. If the ratio exceeds the ambiguity margin threshold, output the best candidate as the final fault type. Otherwise, proceed to step S54. Step S54: Mark as a new type of unknown fault and trigger manual verification; Feedback Update Layer: When the diagnostic result of the dynamometer diagram sample to be tested is a normal sample, update the historical dynamometer diagram sample set and the sliding calibration set under normal operating conditions. The sliding calibration set is the comprehensive non-consistency score set corresponding to the dynamometer diagrams recently determined to be under normal operating conditions, which is used to dynamically adjust the preset alarm threshold. When the diagnostic result of the dynamometer diagram sample to be tested is a brand new fault, a new fault prototype is created in the fault prototype library to update the fault prototype library. The fault prototype library contains multiple types of labeled faults, as well as the prototype center vector, matching radius, and physical evidence set corresponding to each type of fault. The prototype center vector is the mean of 30-dimensional features after whitening various faults, obtained dimension by dimension. The matching radius is the distance from all high-dimensional feature vectors of various faults to the corresponding prototype center vector, and is determined by a quantile statistical algorithm. The set of physical evidence includes at least the most significant physical features that distinguish faults from normal operating conditions, the direction of deviation of each physical feature from normal operating conditions, and the judgment threshold obtained by taking the midpoint between the mean of fault-type physical features and the mean of normal operating condition physical features.

Citation Information

Patent Citations

  • Method for hierarchically diagnosing fault of rod-comprising oil pumping system based on indicator diagram

    CN102011576A

  • Machine learning-based sucker-rod pumping unit underground fault diagnosis method

    CN115059455A