CN114817856B - Beam-pumping unit fault diagnosis method based on structural information retention domain adaptation network - Google Patents

Beam-pumping unit fault diagnosis method based on structural information retention domain adaptation network Download PDF

Info

Publication number
CN114817856B
CN114817856B CN202210397562.9A CN202210397562A CN114817856B CN 114817856 B CN114817856 B CN 114817856B CN 202210397562 A CN202210397562 A CN 202210397562A CN 114817856 B CN114817856 B CN 114817856B
Authority
CN
China
Prior art keywords
domain
target domain
pumping unit
labels
membership matrix
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210397562.9A
Other languages
Chinese (zh)
Other versions
CN114817856A (en
Inventor
辜小花
卢飞
毛禄红
杨光
杨利平
聂玲
潘琚涛
敖桂亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing University of Science and Technology
Original Assignee
Chongqing University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing University of Science and Technology filed Critical Chongqing University of Science and Technology
Priority to CN202210397562.9A priority Critical patent/CN114817856B/en
Publication of CN114817856A publication Critical patent/CN114817856A/en
Application granted granted Critical
Publication of CN114817856B publication Critical patent/CN114817856B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Mathematical Physics (AREA)
  • Evolutionary Biology (AREA)
  • Mathematical Optimization (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Operations Research (AREA)
  • Artificial Intelligence (AREA)
  • Algebra (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention relates to the technical field of petroleum industry, in particular to a pumping unit fault diagnosis method based on a structural information retention domain adaptation network, which comprises the steps of collecting pumping unit indicator diagram data to obtain a source domain data set and a target domain data set, extracting source domain features and target domain features by using a feature generator, performing supervised training by using source domain features and source domain sample labels in the source domain to update the feature generator and a classifier, clustering the target domain features by using an unsupervised clustering algorithm to obtain target domain pseudo-labels, inputting the source domain features and the source domain labels and the target domain features and the target domain pseudo-labels into a local maximum mean difference measurement formula, and performing distribution difference calculation to optimize a feature generator. The structural information holding domain adaptation network provided by the invention can be used for fault diagnosis of the oil pumping unit, can reduce the excessive requirement of fault diagnosis model training on data annotation, and can improve the generalization performance of the fault diagnosis model in different application scenes.

Description

一种基于结构信息保持域适应网络的抽油机故障诊断方法A method for fault diagnosis of oil pumping units based on structural information preserving domain adaptive network

技术领域Technical Field

本发明涉及石油工业技术领域,尤其涉及一种基于结构信息保持域适应网络的抽油机故障诊断方法。The invention relates to the technical field of petroleum industry, and in particular to a method for diagnosing oil pump faults based on a structural information preserving domain adaptive network.

背景技术Background technique

能源问题是关系到社会稳定,国民经济健康持续发展的重大问题,而石油又在能源结构中占有很重要的地位。根据采油方式的不同,采油可以分为两种方式:机械采油和自喷采油。我国使用最为普遍的是机械采油法。抽油机常年工作在地下数千米处,存在环境恶劣、工况复杂、磨损、腐蚀、机械疲劳和功能失效等问题,给抽油机带来了隐患和不确定性。Energy issues are major issues related to social stability and the healthy and sustainable development of the national economy, and oil occupies a very important position in the energy structure. According to different oil production methods, oil production can be divided into two methods: mechanical oil production and self-flowing oil production. The most commonly used method in my country is mechanical oil production. The oil pumping unit works thousands of meters underground all year round. There are problems such as harsh environment, complex working conditions, wear, corrosion, mechanical fatigue and functional failure, which bring hidden dangers and uncertainties to the oil pumping unit.

当前基于人工智能算法的抽油机故障诊断在仿真实验中取得了良好的表现。机器学习算法(如人工神经网络(ANN)、支持向量机(SVM)等)在处理维度和动态监测数据方面存在困难。深度学习算法可以解决更复杂的问题,在故障诊断中得到了广泛的应用。深度置信网络(DBN)、稀疏自动编码器(SAE)和卷积神经网络(CNN)等深度学习算法具有突出的特点故障诊断方面的表现。At present, the fault diagnosis of pumping units based on artificial intelligence algorithms has achieved good performance in simulation experiments. Machine learning algorithms (such as artificial neural networks (ANN), support vector machines (SVM), etc.) have difficulties in processing dimensional and dynamic monitoring data. Deep learning algorithms can solve more complex problems and have been widely used in fault diagnosis. Deep learning algorithms such as deep belief networks (DBN), sparse autoencoders (SAE) and convolutional neural networks (CNN) have outstanding performance in fault diagnosis.

但当前研究大多停留在实验仿真阶段,存在一定的局限性,多数研究没有考虑到模型应用场景不同而带来的模型泛化能力不足,识别准确度下降的问题。However, most current research remains at the experimental simulation stage and has certain limitations. Most studies do not take into account the problems of insufficient model generalization ability and decreased recognition accuracy caused by different model application scenarios.

发明内容Summary of the invention

本发明的目的在于提供一种基于结构信息保持域适应网络的抽油机故障诊断方法,旨在解决当前多数研究没有考虑到模型应用场景不同而带来的模型泛化能力不足,识别准确度下降的问题。The purpose of the present invention is to provide a method for pumping unit fault diagnosis based on a structural information preserving domain adaptive network, aiming to solve the problem that most current studies do not take into account different model application scenarios, resulting in insufficient model generalization ability and reduced recognition accuracy.

为实现上述目的,本发明提供了一种基于结构信息保持域适应网络的抽油机故障诊断方法,包括采集抽油机示功图数据,得到源域数据集和目标域数据集;To achieve the above object, the present invention provides a method for fault diagnosis of an oil pumping unit based on a structural information preserving domain adaptive network, comprising collecting the oil pumping unit indicator diagram data to obtain a source domain data set and a target domain data set;

使用特征生成器提取源域特征和目标域特征;Use feature generator to extract source domain features and target domain features;

在源域中使用源域特征和源域样本标签进行有监督训练更新特征生成器和分类器;In the source domain, supervised training is performed using source domain features and source domain sample labels to update the feature generator and classifier;

使用无监督聚类算法对目标域特征进行聚类获得目标域伪标签;Use an unsupervised clustering algorithm to cluster the target domain features to obtain the target domain pseudo-label;

将源域特征和源域标签,以及目标域特征和目标域伪标签输入局部最大均值差异进行分布差异计算对特征生成器进行优化。The source domain features and source domain labels, as well as the target domain features and target domain pseudo labels are input into the local maximum mean difference to calculate the distribution difference and optimize the feature generator.

其中,所述示功图指由位移和荷载荷离散点组成的封闭曲线图。The dynamometer diagram refers to a closed curve diagram consisting of discrete points of displacement and load.

其中,所述特征生成器为由卷积神经网络构成的特征提取模型。Among them, the feature generator is a feature extraction model composed of a convolutional neural network.

其中,所述获得目标域伪标签的具体步骤包括:The specific steps of obtaining the target domain pseudo label include:

根据数据集随机初始化隶属度矩阵;Randomly initialize the membership matrix according to the data set;

计算最佳的隶属度矩阵和聚类中心;Calculate the optimal membership matrix and cluster centers;

利用隶属度矩阵和聚类中心获得目标域的伪标签。The pseudo labels of the target domain are obtained using the membership matrix and cluster centers.

其中,所述计算最佳隶属度矩阵和聚类中心的具体步骤包括:The specific steps of calculating the optimal membership matrix and cluster centers include:

利用隶属度矩阵更新聚类中心;Update cluster centers using membership matrix;

利用聚类中心计算样本到聚类中心的欧式距离;Use the cluster center to calculate the Euclidean distance from the sample to the cluster center;

利用聚类数、聚类中心距离和模糊权重指数更新隶属度矩阵;Update the membership matrix using the number of clusters, cluster center distance and fuzzy weight index;

根据是否达到最大迭代次数及误差判断是否满足迭代停止条件;Determine whether the iteration stop condition is met based on whether the maximum number of iterations and the error are reached;

得到算法最佳的隶属度矩阵和聚类中心;Get the algorithm's best membership matrix and cluster center;

其中,所述获得目标域的伪标签的具体步骤为:The specific steps of obtaining the pseudo label of the target domain are as follows:

根据隶属度矩阵获得样本聚类标签;Obtain sample cluster labels based on the membership matrix;

针对每个聚类标签下的样本,利用分类器获得分类标签;For each sample under each cluster label, use the classifier to obtain the classification label;

统计每个分类标签的数量;Count the number of each classification label;

选择分类标签数量最多的标签作为聚类类别的标签,并更新聚类中心;Select the label with the largest number of classification labels as the label of the cluster category and update the cluster center;

利用新的聚类中心更新隶属度矩阵;Update the membership matrix using the new cluster centers;

根据新的隶属度矩阵获得目标域伪标签。Obtain the target domain pseudo-label according to the new membership matrix.

本发明的一种基于结构信息保持域适应网络的抽油机故障诊断方法,能够用于抽油机的故障诊断,能够降低故障诊断模型训练对数据标注的过度要求,并能够提高故障诊断模型在不同应用场景的泛化性能。The present invention discloses a method for diagnosing oil pump faults based on a structural information preserving domain adaptive network, which can be used for fault diagnosis of oil pumps, can reduce the excessive requirements for data labeling in fault diagnosis model training, and can improve the generalization performance of the fault diagnosis model in different application scenarios.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

图1是本发明的一种基于结构信息保持域适应网络的抽油机故障诊断方法的流程图。FIG1 is a flow chart of a method for diagnosing oil pumping unit faults based on a structural information preserving domain adaptive network according to the present invention.

图2是目标域伪标签获取的具体步骤的流程图。FIG2 is a flowchart of the specific steps of acquiring pseudo labels in the target domain.

图3是任务D1→D2测试集结果的混淆矩阵。Figure 3 is the confusion matrix of the test set results for task D1→D2.

图4是SIP-DAN在任务D1→D2训练过程的损失曲线。Figure 4 is the loss curve of SIP-DAN during the training process of task D1→D2.

图5是各种方法训练过程中的目标域测试准确率曲线。Figure 5 is the target domain test accuracy curve during the training process of various methods.

图6是任务D1→D2测试集结果的t-SNE图。Figure 6 is a t-SNE graph of the test set results for task D1→D2.

具体实施方式Detailed ways

下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本发明,而不能理解为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

本发明的具体实施例为:The specific embodiments of the present invention are:

请参阅,本发明提供一种基于结构信息保持域适应网络(Structure InformationPreservingDomainAdaptationNetwork,SIP-DAN)的抽油机故障诊断方法,包括:Please refer to the present invention, which provides a method for diagnosing oil pump faults based on a structure information preserving domain adaptation network (Structure Information Preserving Domain Adaptation Network, SIP-DAN), comprising:

S101采集抽油机示功图数据,得到源域数据集和目标域数据集;S101 collects the pumping unit indicator diagram data to obtain a source domain data set and a target domain data set;

采集抽油机示功图数据,并将其划分源域数据集和目标域数据集。The pumping unit dynamometer data are collected and divided into source domain data set and target domain data set.

为了避免数据之间的尺寸不同对计算的影响,对示功图原始数据进行归一化。每个示功图都由一组位移x和载荷y离散点{(xi,yi)}组成。In order to avoid the influence of different sizes between data on the calculation, the original data of the dynamometer diagram are normalized. Each dynamometer diagram consists of a set of discrete points {( xi , yi )} of displacement x and load y.

位移归一化公式如下:The displacement normalization formula is as follows:

其中:M为位移的样本个数;N为一个位移样本中的位移点数;Where: M is the number of displacement samples; N is the number of displacement points in a displacement sample;

xik为归一化前的第i个位移样本的第k个样本值; xik is the kth sample value of the ith displacement sample before normalization;

为归一化后的第i个位移样本的第k个样本值; is the kth sample value of the i-th displacement sample after normalization;

xi,min=min{xik|1≤k≤N}; xi,min = min{ xik |1≤k≤N};

xi,max=max{xik|1≤k≤N}。 xi,max = max{ xik |1≤k≤N}.

载荷归一化公式如下:The load normalization formula is as follows:

其中:M为载荷的样本个数;N为一个载荷样本中的载荷点数;Where: M is the number of load samples; N is the number of load points in a load sample;

yik为归一化前的第i个载荷样本的第k个样本值;y ik is the kth sample value of the ith load sample before normalization;

为归一化后的第i个载荷样本的第k个样本值; is the kth sample value of the i-th load sample after normalization;

yi,min=min{yik|1≤k≤N}; yi,min = min{ yik |1≤k≤N};

yi,max=max{yik|1≤k≤N}。 yi,max = max{ yik |1≤k≤N}.

使用归一化之后的载荷和位移,以位移为横坐标、载荷为纵坐标绘制示功图,并保存为图片样本。Use the normalized load and displacement to draw a dynamometer diagram with displacement as the horizontal axis and load as the vertical axis, and save it as a picture sample.

S102使用特征生成器提取源域特征F(xs)和目标域特征F(xt);S102 uses a feature generator to extract source domain features F(x s ) and target domain features F(x t );

所述特征生成器为卷积神经网络。The feature generator is a convolutional neural network.

S103在源域中使用源域特征和源域样本标签进行有监督训练更新特征生成器和分类器;S103 uses source domain features and source domain sample labels to perform supervised training in the source domain to update the feature generator and the classifier;

故障分类器的优化目标是在源域数据标签的监督下,最小化分类误差。这样,就可以提取出可识别的故障特征。使用F(·)来表示特征提取器的输出和C(·)来表示分类器的输出。分类损失使用交叉熵损失函数:The optimization goal of the fault classifier is to minimize the classification error under the supervision of the source domain data label. In this way, recognizable fault features can be extracted. Use F(·) to represent the output of the feature extractor and C(·) to represent the output of the classifier. The classification loss uses the cross entropy loss function:

其中,ys表示源域样本标签的one-hot形式;是源域中分类器的输出, Among them, y s represents the one-hot form of the source domain sample label; is the output of the classifier in the source domain,

S104使用无监督聚类算法对目标域特征进行聚类获得目标域伪标签;S104 uses an unsupervised clustering algorithm to cluster the target domain features to obtain a target domain pseudo label;

这里使用模糊C均值聚类算法(Fuzzy C-Means,FCM)对目标域的特征F(xt)进行聚类获得聚类标签,然后使用分类器辅助聚类标签的对齐。步骤为:Here, the fuzzy C-means (FCM) clustering algorithm is used to cluster the target domain features F(x t ) to obtain cluster labels, and then a classifier is used to assist in the alignment of cluster labels. The steps are:

S401随机初始化隶属度矩阵U=[uij]N×MS401 randomly initializes the membership matrix U=[u ij ] N×M .

其中N表示样本数,M表示聚类数,uij表示第i(i=1,2,…,N)个样本属于第j(j=1,2,…,M)类的隶属度,满足以下关系:Where N is the number of samples, M is the number of clusters, and uij is the membership of the i-th (i=1,2,…,N) sample to the j-th (j=1,2,…,M) class, satisfying the following relationship:

S402利用隶属度矩阵计算最佳的隶属度矩阵和聚类中心S402 uses the membership matrix to calculate the best membership matrix and cluster center

(1)计算聚类中心:(1) Calculate cluster centers:

其中,cj表示第j个聚类中心,N表示样本数,fi表示第i个样本,m为模糊权重指数。Among them, cj represents the jth cluster center, N represents the number of samples, fi represents the ith sample, and m is the fuzzy weight index.

(2)计算第i个样本fi到第j个聚类中心cj的欧氏距离:(2) Calculate the Euclidean distance from the i-th sample fi to the j-th cluster center cj :

(3)更新隶属度矩阵uij(3) Update the membership matrix u ij :

其中,M为聚类数,dij为第i个样本到第j个聚类中心的距离,dik为第i个样本到第k个聚类中心的距离,m为模糊权重指数。Among them, M is the number of clusters, d ij is the distance from the ith sample to the jth cluster center, d ik is the distance from the ith sample to the kth cluster center, and m is the fuzzy weight index.

(4)判断是否满足以下任意迭代停止条件(4) Determine whether any of the following iteration stop conditions are met

条件1:判断是否达到最大迭代次数max_iterCondition 1: Determine whether the maximum number of iterations max_iter is reached

条件2:判断误差Condition 2: Judgment error

其中,为当前迭代的隶属度矩阵,/>为上一次迭代的隶属度矩阵,ε为误差阈值。in, is the membership matrix of the current iteration,/> is the membership matrix of the previous iteration, and ε is the error threshold.

满足条件1和条件2其中一个,即可停止迭代。If one of condition 1 and condition 2 is met, the iteration can be stopped.

(5)当不满足(4)的迭代停止条件,则重复(2)到(4)。当满足(4)的迭代停止条件,停止迭代,(5) If the iteration stop condition of (4) is not met, repeat (2) to (4). If the iteration stop condition of (4) is met, stop the iteration.

得到算法最佳的隶属度矩阵U和聚类中心C。The algorithm obtains the optimal membership matrix U and cluster center C.

S403利用隶属度矩阵和聚类中心获得目标域的伪标签S403 uses the membership matrix and cluster centers to obtain the pseudo labels of the target domain

(1)根据隶属度矩阵U,获得每个样本的聚类类别。(1) According to the membership matrix U, the clustering category of each sample is obtained.

(2)将第i(i=1,2,…,k)个聚类类别的样本输入分类器C,获得分类器的分类标签。(2) Input the samples of the i-th (i=1, 2, …, k) cluster category into the classifier C to obtain the classification label of the classifier.

(3)统计分类标签中每个类别的数量counter。(3) Count the number of each category in the classification label.

(4)更新当前聚类类别的聚类中心为:Cnew i=C(max(counter))。重复(1)到(3),使得每个聚类中心都被更新,获得新的聚类中心Cnew,使用更新后的聚类中心Cnew,根据S402中(3)的公式,更新隶属度矩阵U,获得新的隶属度矩阵Unew(4) Update the cluster center of the current cluster category to: C new i = C (max (counter)). Repeat (1) to (3) so that each cluster center is updated to obtain a new cluster center C new , and use the updated cluster center C new to update the membership matrix U according to the formula (3) in S402 to obtain a new membership matrix U new .

获得目标域的伪标签S105将源域特征和源域标签,以及目标域特征和目标域伪标签输入局部最大均值差异(Local maximum mean discrepancy,LMMD)进行分布差异计算对特征生成器进行优化。Get pseudo labels for the target domain S105 inputs the source domain features and source domain labels, as well as the target domain features and target domain pseudo labels into the local maximum mean discrepancy (LMMD) to calculate the distribution difference and optimize the feature generator.

获得目标域伪标签后,将源域特征F(xs)和标签ys,以及目标域特征F(xt)和伪标签/>输入LMMD进行分布差异计算。Obtain target domain pseudo labels Then, the source domain features F( xs ) and labels ys , as well as the target domain features F( xt ) and pseudo labels/> Enter LMMD to calculate the distribution difference.

LMMD其基本思想是通过类别标签将这两个域划分为多个子域,然后对相关的子域进行细粒度的域自适应。假设每个样本属于每个类的权重为wc。LMMD的定义如下:The basic idea of LMMD is to divide the two domains into multiple subdomains by category labels, and then perform fine-grained domain adaptation on the relevant subdomains. Assume that the weight of each sample belonging to each class is w c . The definition of LMMD is as follows:

其中,H是给定特征核k的再生核希尔伯特空间(RKHS);φ(·)表示从原始特征空间到RKHS的非线性映射;C为故障类别数;为源域中第i个样本属于子类c的权重;/>为目标域中第j个样本属于子类c的权重。Where H is the reproducing kernel Hilbert space (RKHS) of a given feature kernel k; φ(·) represents the nonlinear mapping from the original feature space to RKHS; C is the number of fault categories; is the weight of the i-th sample in the source domain belonging to subclass c;/> is the weight of the jth sample in the target domain belonging to subclass c.

由于φ(·)不能直接计算的,公式展开如下:Since φ(·) cannot be calculated directly, the formula is expanded as follows:

计算权重wc的方法如下:The method to calculate the weight w c is as follows:

其中yic为第i个样本属于第c类的概率,n为样本数。对于源域样本,直接使用ys的one-hot形式;对于目标域,则使用步骤(5)中获得的样本伪标签ytWhere y ic is the probability that the ith sample belongs to the cth class, and n is the number of samples. For source domain samples, the one-hot form of y s is used directly; for the target domain, the sample pseudo label y t obtained in step (5) is used.

在本实施例中:In this embodiment:

(1)数据集(1) Dataset

根据数据来源的不同组成了三个数据集(命名为D1、D2、D3),每个数据集都包括正常工况和6类故障,编号为:Normal、Fault#1、Fault#2、Fault#3、Fault#4、Fault#5、Fault#6。数据集的具体情况如表1所示,一般情况下大多抽油机都处在正常工作的运行状态,从而导致故障样本的收集很困难。在分析得到的数据集中,正常样本非常多,但是有的故障类型的样本比较少(如气锁),这里为了降低数据不平衡的影响,每种工况的样本数限制为500个。Three data sets (named D1, D2, and D3) were formed according to different data sources. Each data set includes normal working conditions and 6 types of faults, numbered as Normal, Fault#1, Fault#2, Fault#3, Fault#4, Fault#5, and Fault#6. The specific situation of the data set is shown in Table 1. In general, most pumping units are in a normal working state, which makes it difficult to collect fault samples. In the analyzed data set, there are many normal samples, but there are relatively few samples of some fault types (such as gas lock). In order to reduce the impact of data imbalance, the number of samples for each working condition is limited to 500.

表1数据集样本情况Table 1 Dataset samples

各个数据集的典型示功图形状如表2所示,由于不同数据集原始数据的采集条件不一致,导致同一种工况在不同数据集下形状有所差异。条件因素可能是机器型号不同、传感器型号差异、油井地质不同等,这些都会造成数据集之间的分布差异,从而使得在一个数据集上训练的模型,应用到另一个数据集上进行测试时分类能力下降,不具备好的泛化性能。The typical dynamometer diagrams of each data set are shown in Table 2. Due to the inconsistent acquisition conditions of the original data of different data sets, the same working condition has different shapes in different data sets. The conditional factors may be different machine models, sensor models, oil well geology, etc., which will cause distribution differences between data sets, so that the classification ability of the model trained on one data set is reduced when it is applied to another data set for testing, and it does not have good generalization performance.

表2各个数据集的典型示功图形状Table 2 Typical dynamometer diagram shapes for each data set

(2)实验设置(2) Experimental setup

在D1、D2和D3三个数据集上设置6个源域到目标域的域适应任务(D1→D2,D1→D3,D2→D1,D2→D3,D3→D1,D3→D2),数据样本的具体情况如表3所示。如D1→D2表示:D1为有标签的源域,D2为无标签的目标域。Six domain adaptation tasks from source domain to target domain are set on three datasets D1, D2 and D3 (D1→D2, D1→D3, D2→D1, D2→D3, D3→D1, D3→D2), and the details of the data samples are shown in Table 3. For example, D1→D2 means: D1 is a labeled source domain, and D2 is an unlabeled target domain.

表3域适应任务设置Table 3 Domain adaptation task settings

为了验证SIP-DAN方法的有效性,将几种监督学习算法和域适应方法和所提方法进行对比分析,这些方法包括:In order to verify the effectiveness of the SIP-DAN method, several supervised learning algorithms and domain adaptation methods are compared with the proposed method. These methods include:

SVM:支持向量机,作为机器学习的经典方法在各个领域广泛使用。SVM: Support vector machine, as a classic method of machine learning, is widely used in various fields.

ResNet18:一个典型的深度残差卷积神经网络,作为评估域适应任务特征提取能力的基准。因为ResNet18是一个有监督的学习网络,所以只使用有标记的源域数据进行训练,而不使用未标记的目标域数据。ResNet18: A typical deep residual convolutional neural network, used as a benchmark for evaluating the feature extraction capabilities of domain adaptation tasks. Because ResNet18 is a supervised learning network, only labeled source domain data is used for training, and unlabeled target domain data is not used.

DAN:一种基于距离测量的深度域自适应方法,使用最大均值差异(Maximummeandiscrepancy,MMD)作为分布差异度量,是一种全局域适应方法。DAN: A deep domain adaptation method based on distance measurement, using maximum mean discrepancy (MMD) as the distribution difference metric, is a global domain adaptation method.

D-CORAL:一种基于距离测量的深度域自适应方法,使用CORAL作为分布差异度量。对源域和目标域进行线性变换,以对齐其二阶统计信息,是一种全局域适应方法。D-CORAL: A deep domain adaptation method based on distance measurement, using CORAL as the distribution difference metric. It linearly transforms the source and target domains to align their second-order statistics, which is a global domain adaptation method.

对于SVM,将图片读入维度为100*100,直接拉平维度为10000,作为SVM的输入。使用sklearn库下的SVM进行实验,参数设置:C=1.0,γ=auto,Kenel=RBF。For SVM, the image is read into the dimension of 100*100, and the dimension is directly flattened to 10000 as the input of SVM. The SVM under the sklearn library is used for experiments, and the parameter settings are: C=1.0, γ=auto, Kenel=RBF.

对于SIP-DAN,平衡参数进行动态设置,计算公式为:λ=2/(1+exp(-10*ep/epoch))-1(其中ep为当前迭代步数,epoch为迭代总数)。For SIP-DAN, the balance parameter is set dynamically, and the calculation formula is: λ=2/(1+exp(-10*ep/epoch))-1 (where ep is the current iteration step and epoch is the total number of iterations).

以上几种深度模型方法全部使用ResNet18作为基础的特征提取网络,通用的实验参数设置为:The above several deep model methods all use ResNet18 as the basic feature extraction network, and the general experimental parameters are set as follows:

表4实验参数设置Table 4 Experimental parameter settings

(3)故障诊断性能对比分析实验(3) Fault diagnosis performance comparison and analysis experiment

在6个领域适应任务上实现了SIP-DAN等方法,表5总结了所有比较方法的平均诊断准确率。SIP-DAN and other methods are implemented on 6 domain adaptation tasks, and Table 5 summarizes the average diagnostic accuracy of all compared methods.

首先是传统机器学习方法SVM和深度方法ResNet18的对比,可以看到由于传统方法没有专门设计示功图的特征提取方法,SVM的跨域故障诊断准确率非常低。深度方法ResNet18经过端到端自适应特征提取和训练,最终准确率远高于SVM,说明了深度方法的优越性。First, the comparison between the traditional machine learning method SVM and the deep method ResNet18 shows that the accuracy of cross-domain fault diagnosis of SVM is very low because the traditional method does not have a special feature extraction method for the dynamometer diagram. The deep method ResNet18 has a much higher accuracy than SVM after end-to-end adaptive feature extraction and training, which shows the superiority of the deep method.

DAN和D-CORAL都是全局域适应的代表方法,对于六个任务的平均准确率分别为86.96%和88.33%,相对于没有域适应的ResNet18提高了1.57%和3.17%,可以发现全局域适应对模型的准确率提升比较有限,这是因为全局域适应方法在域适应过程中忽略了类别信息的重要性,导致没有提取到明显的类判别特征。DAN and D-CORAL are both representative methods of global domain adaptation. The average accuracy of the six tasks is 86.96% and 88.33% respectively, which is 1.57% and 3.17% higher than that of ResNet18 without domain adaptation. It can be found that global domain adaptation has limited improvement on the accuracy of the model. This is because the global domain adaptation method ignores the importance of category information in the domain adaptation process, resulting in no obvious class discriminant features being extracted.

SIP-DAN是本发明提出的细粒度域适应,考虑了域适应过程中类别信息,同时还考虑了目标域特征信息的保持,因此获得较好的准确率。6个任务中,在4个任务上取得最佳的准确率,平均准确率相对于ResNet18提高了10.59%,起到了较好的源域知识迁移效果。SIP-DAN is a fine-grained domain adaptation proposed by the present invention. It takes into account the category information in the domain adaptation process and also considers the preservation of the target domain feature information, thus achieving a better accuracy. Among the 6 tasks, the best accuracy was achieved on 4 tasks, and the average accuracy was improved by 10.59% compared with ResNet18, which played a better effect of source domain knowledge transfer.

表5各种方法的结果Table 5 Results of various methods

(4)混淆矩阵对比(4) Confusion Matrix Comparison

以任务D1→D2为例,目标域测试集的混淆矩阵结果如图3所示。从ResNet18的结果来看,D1→D2任务的分布差异主要体现在类别Normal和Falut#2上,ResNet18将55%的Normal样本误识别为Fault#1,将13%的Normal样本误识别为Fault#6;ResNet18将32%的Fault#2样本误识别为Fault#1,将9%的Fault#2样本误识别为Fault#3。经过DAN域适应后没有改善误识别情况,D-CORAL域适应后改善了对Normal的识别,但是对Fault#2的识别效果更差了。如(d)所示,本发明所提方法SIP-DAN大大提高了模型故障诊断能力。Taking the task D1→D2 as an example, the confusion matrix result of the target domain test set is shown in Figure 3. From the results of ResNet18, the distribution difference of the D1→D2 task is mainly reflected in the categories Normal and Falut#2. ResNet18 misidentifies 55% of Normal samples as Fault#1 and 13% of Normal samples as Fault#6; ResNet18 misidentifies 32% of Fault#2 samples as Fault#1 and 9% of Fault#2 samples as Fault#3. The misidentification situation was not improved after DAN domain adaptation. The recognition of Normal was improved after D-CORAL domain adaptation, but the recognition effect of Fault#2 was worse. As shown in (d), the proposed method SIP-DAN greatly improves the model fault diagnosis capability.

(5)算法收敛性分析实验(5) Algorithm convergence analysis experiment

以任务D1→D2为例,SIP-DAN训练过程中损失值随着训练迭代步数的变化如图4所示。可以发现分类损失在训练开始的初期就非常快速的收敛,最开始域适应平衡参数λ较小,域适应损失在总损失值中占比较小,因此总损失也很小。随着训练的进行λ逐渐增大,LMMD域适应损失在总损失中占比增大,总损失曲线在训练前段呈现增大的趋势,但是随着网络的域适应训练,源域和目标域的分布差异(LMMD)越来越小,所以总损失曲线在训练中期呈现减小的趋势,最终在训练中后期收敛。Taking task D1→D2 as an example, the change of loss value with the number of training iterations during SIP-DAN training is shown in Figure 4. It can be found that the classification loss converges very quickly at the beginning of training. At the beginning, the domain adaptation balance parameter λ is small, and the domain adaptation loss accounts for a small proportion of the total loss value, so the total loss is also small. As the training progresses, λ gradually increases, and the proportion of LMMD domain adaptation loss in the total loss increases. The total loss curve shows an increasing trend in the early stage of training. However, with the domain adaptation training of the network, the distribution difference (LMMD) between the source domain and the target domain becomes smaller and smaller, so the total loss curve shows a decreasing trend in the middle of training, and finally converges in the middle and late stages of training.

以任务D1→D2为例,四种方法训练过程中而测试集准确率随着训练步数的变化如图5所示。可以看到DAN是收敛得最慢的,最终准确率也最低。其他三种方法的收敛速度差不大,最终的准确率都在80%左右,本发明提出的SIP-DAN的准确率是最好的,并且训练过程平稳,没有大的波动。Taking task D1→D2 as an example, the changes of the test set accuracy with the number of training steps during the training process of the four methods are shown in Figure 5. It can be seen that DAN converges the slowest and has the lowest final accuracy. The convergence speeds of the other three methods are not much different, and the final accuracy is about 80%. The accuracy of SIP-DAN proposed in the present invention is the best, and the training process is stable without large fluctuations.

(6)特征可视化实验(6) Feature visualization experiment

为了观察域适应之后特征分布情况,使用t-SNE将深度网络最后一层特征层降维到2维,然后进行可视化。任务D1→D2测试集的t-SNE降维可视化如图6所示,可以看到ResNet18的特征分布存在明显偏移,经过DAN和D-CORAL全局域适应之后,并没有将特征分布完全对齐,但有一定效果。SIP-DAN通过对子类进行分布对齐,所以能获得更好的性能,7个类别的特征分布对齐程度明显高于其他三种方法。In order to observe the feature distribution after domain adaptation, t-SNE is used to reduce the dimension of the last feature layer of the deep network to 2 dimensions and then visualized. The t-SNE dimension reduction visualization of the task D1→D2 test set is shown in Figure 6. It can be seen that there is an obvious offset in the feature distribution of ResNet18. After global domain adaptation of DAN and D-CORAL, the feature distribution is not completely aligned, but there is a certain effect. SIP-DAN can achieve better performance by aligning the distribution of subclasses. The alignment of the feature distribution of the 7 categories is significantly higher than that of the other three methods.

以上所揭露的仅为本发明一种较佳实施例而已,当然不能以此来限定本发明之权利范围,本领域普通技术人员可以理解实现上述实施例的全部或部分流程,并依本发明权利要求所作的等同变化,仍属于发明所涵盖的范围。What is disclosed above is only a preferred embodiment of the present invention, and it certainly cannot be used to limit the scope of rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiment and equivalent changes made according to the claims of the present invention still fall within the scope of the invention.

Claims (4)

1. A pumping unit fault diagnosis method based on a structural information retention domain adaptation network is characterized in that,
Collecting oil pumping unit indicator diagram data to obtain a source domain data set and a target domain data set;
Extracting source domain features and target domain features using a feature generator;
performing supervised training in a source domain by using source domain features and source domain sample labels to update a feature generator and a classifier;
clustering the target domain features by using an unsupervised clustering algorithm to obtain target domain pseudo tags;
Inputting the source domain features and the source domain labels and the target domain features and the target domain pseudo labels into a local maximum mean difference measurement formula to perform distribution difference calculation so as to optimize a feature generator;
the specific steps for obtaining the target domain pseudo tag comprise:
randomly initializing a membership matrix according to the data set;
Calculating an optimal membership matrix and a clustering center;
obtaining a pseudo tag of the target domain by using the membership matrix and the clustering center;
the specific steps of obtaining the pseudo tag of the target domain are as follows:
obtaining a sample clustering label according to the membership matrix;
Aiming at the samples under each cluster label, a classifier is utilized to obtain a classification label;
Counting the number of each classification label;
selecting the label with the largest number of classified labels as the label of the clustering class, and updating the clustering center;
updating the membership matrix by using a new cluster center;
And obtaining the target domain pseudo tag according to the new membership matrix.
2. The method for diagnosing the failure of the pumping unit based on the structural information retention domain adaptive network according to claim 1, wherein,
The indicator diagram refers to a closed graph formed by displacement and load discrete points.
3. The method for diagnosing the failure of the pumping unit based on the structural information retention domain adaptive network according to claim 1, wherein,
The feature generator is a feature extraction model formed by a convolutional neural network.
4. A pumping unit fault diagnosis method based on a structural information holding domain adaptive network as defined in claim 1, wherein,
The specific steps of calculating the optimal membership matrix and the clustering center comprise:
updating the clustering center by using the membership matrix;
Calculating the Euclidean distance from the sample to the clustering center by using the clustering center;
updating the membership matrix by using the cluster number, the cluster center distance and the fuzzy weight index;
Judging whether an iteration stop condition is met according to whether the maximum iteration times and the errors are reached;
obtaining the optimal membership matrix and clustering center of the algorithm.
CN202210397562.9A 2022-04-15 2022-04-15 Beam-pumping unit fault diagnosis method based on structural information retention domain adaptation network Active CN114817856B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210397562.9A CN114817856B (en) 2022-04-15 2022-04-15 Beam-pumping unit fault diagnosis method based on structural information retention domain adaptation network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210397562.9A CN114817856B (en) 2022-04-15 2022-04-15 Beam-pumping unit fault diagnosis method based on structural information retention domain adaptation network

Publications (2)

Publication Number Publication Date
CN114817856A CN114817856A (en) 2022-07-29
CN114817856B true CN114817856B (en) 2024-05-28

Family

ID=82537062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210397562.9A Active CN114817856B (en) 2022-04-15 2022-04-15 Beam-pumping unit fault diagnosis method based on structural information retention domain adaptation network

Country Status (1)

Country Link
CN (1) CN114817856B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115906949B (en) * 2022-11-22 2023-06-20 东北石油大学三亚海洋油气研究院 Petroleum pipeline fault diagnosis method and system, storage medium and petroleum pipeline fault diagnosis equipment
CN117173350B (en) * 2023-08-09 2024-07-05 中国科学技术大学 Geological modeling method, system and medium based on active domain adaptive learning
CN119671534A (en) * 2024-11-28 2025-03-21 大庆安华斯特石油机械设备制造有限公司 Oil well operating condition fault early warning method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582003A (en) * 2018-12-03 2019-04-05 东北林业大学 Based on pseudo label semi-supervised kernel part Fei Sheer discriminant analysis bearing failure diagnosis
CA3128957A1 (en) * 2019-03-04 2020-03-03 Bhaskar Bhattacharyya Near real-time detection and classification of machine anomalies using machine learning and artificial intelligence
CN112729835A (en) * 2021-01-30 2021-04-30 温州大学 Multi-domain semi-supervised fault diagnosis method and device for axial plunger pump bearing
CN112819059A (en) * 2021-01-26 2021-05-18 中国矿业大学 Rolling bearing fault diagnosis method based on popular retention transfer learning
CN113792758A (en) * 2021-08-18 2021-12-14 中国矿业大学 A fault diagnosis method for rolling bearings based on self-supervised learning and clustering

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190384255A1 (en) * 2018-06-19 2019-12-19 Honeywell International Inc. Autonomous predictive real-time monitoring of faults in process and equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582003A (en) * 2018-12-03 2019-04-05 东北林业大学 Based on pseudo label semi-supervised kernel part Fei Sheer discriminant analysis bearing failure diagnosis
CA3128957A1 (en) * 2019-03-04 2020-03-03 Bhaskar Bhattacharyya Near real-time detection and classification of machine anomalies using machine learning and artificial intelligence
CN112819059A (en) * 2021-01-26 2021-05-18 中国矿业大学 Rolling bearing fault diagnosis method based on popular retention transfer learning
CN112729835A (en) * 2021-01-30 2021-04-30 温州大学 Multi-domain semi-supervised fault diagnosis method and device for axial plunger pump bearing
CN113792758A (en) * 2021-08-18 2021-12-14 中国矿业大学 A fault diagnosis method for rolling bearings based on self-supervised learning and clustering

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Bearing Fault Diagnosis Under Variable Working Conditions Based on Domain Adaptation Using Feature Transfer Learning;Zhe Tong等;《IEEE Access 》;20181123;第6卷;76187 - 76197 *
基于无监督域适应的变负载下滚动轴承状态评估方法研究;邹佳悦;《中国优秀硕士学位论文全文数据库工程科技Ⅱ辑》;20210215(第02期);C029-294 *
基于领域自适应的抽油机故障诊断方法研究;卢飞;《重庆科技学院硕士专业学位毕业论文》;20240402;1-65 *

Also Published As

Publication number Publication date
CN114817856A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
CN114817856B (en) Beam-pumping unit fault diagnosis method based on structural information retention domain adaptation network
CN113723632B (en) Industrial equipment fault diagnosis method based on knowledge graph
CN113988126B (en) Rolling bearing fault diagnosis method based on few-label data feature migration
CN112964469B (en) Online fault diagnosis method for rolling bearing under variable load of transfer learning
CN101907681B (en) Analog circuit dynamic online failure diagnosing method based on GSD-SVDD
Arbin et al. Comparative analysis between k-means and k-medoids for statistical clustering
CN111539152B (en) Rolling bearing fault self-learning method based on two-stage twin convolutional neural network
CN113255573B (en) Pedestrian re-identification method based on mixed cluster center label learning and storage medium
CN109086793A (en) A kind of abnormality recognition method of wind-driven generator
CN112860183B (en) Intelligent fault diagnosis method for multi-source distillation-migration machinery based on high-order moment matching
CN111428768A (en) Clustering Method Based on Hellinger Distance-Gaussian Mixture Model
CN111338950A (en) Software defect feature selection method based on spectral clustering
Lu et al. A modified active learning intelligent fault diagnosis method for rolling bearings with unbalanced samples
CN110765587A (en) Complex petrochemical process fault diagnosis method based on dynamic regularization judgment local retention projection
Ma et al. A collaborative central domain adaptation approach with multi-order graph embedding for bearing fault diagnosis under few-shot samples
CN108416373A (en) A kind of unbalanced data categorizing system based on regularization Fisher threshold value selection strategies
CN113609770A (en) Rolling bearing RUL prediction method based on piecewise linear fitting HI and LSTM
CN108564009A (en) A kind of improvement characteristic evaluation method based on mutual information
CN115146718B (en) Wind turbine anomaly detection method based on deep representation
WO2020259391A1 (en) Database script performance testing method and device
CN115791174A (en) Rolling bearing abnormity diagnosis method and system, electronic equipment and storage medium
CN115358337A (en) Small sample fault diagnosis method and device and storage medium
CN112306731B (en) Two-stage defect-distinguishing report severity prediction method based on space word vector
CN112416920B (en) MES-oriented data cleaning method and system
CN116701948B (en) Pipeline fault diagnosis method and system, storage medium and pipeline fault diagnosis equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant