CN115565028A - Transformer oil aging detection method, detection system, electronic equipment and readable storage medium - Google Patents
Transformer oil aging detection method, detection system, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN115565028A CN115565028A CN202211128233.0A CN202211128233A CN115565028A CN 115565028 A CN115565028 A CN 115565028A CN 202211128233 A CN202211128233 A CN 202211128233A CN 115565028 A CN115565028 A CN 115565028A
- Authority
- CN
- China
- Prior art keywords
- aging
- model
- transformer oil
- training
- sample
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/774—Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/17—Systems in which incident light is modified in accordance with the properties of the material investigated
- G01N21/25—Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/30—Noise filtering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/34—Smoothing or thinning of the pattern; Morphological operations; Skeletonisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/58—Extraction of image or video features relating to hyperspectral data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/766—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using regression, e.g. by projecting features on hyperplanes
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Databases & Information Systems (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Evolutionary Computation (AREA)
- Computing Systems (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Artificial Intelligence (AREA)
- Spectroscopy & Molecular Physics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Other Investigation Or Analysis Of Materials By Electrical Means (AREA)
Abstract
本发明专利公开了一种变压器油老化检测方法、检测系统、电子设备及可读存储介质,Stacking集成学习的方法是将现有的高光谱检测算法相融合,充分结合各单一学习器的优势,扬长避短,提高集成学习的泛化能力与检测精度,通过此方法实现对变压器老化状态的优化检测。同时高光谱检测方法相较于其他的绝缘油老化检测方法具有方便快捷、灵敏性高以及应用性强等突出优点,能够准确反映变压器油的老化情况,该方法可以被广泛的应用于变压器的绝缘油老化检测场景中。
The patent of the present invention discloses a transformer oil aging detection method, detection system, electronic equipment and readable storage medium. The Stacking integrated learning method is to integrate the existing hyperspectral detection algorithms and fully combine the advantages of each single learner. Improve the generalization ability and detection accuracy of integrated learning by making full use of strengths and avoiding weaknesses, and realize the optimized detection of transformer aging state through this method. At the same time, compared with other insulating oil aging detection methods, the hyperspectral detection method has outstanding advantages such as convenience, high sensitivity, and strong applicability, and can accurately reflect the aging of transformer oil. This method can be widely used in the insulation of transformers. In the scene of oil aging detection.
Description
技术领域technical field
本发明属于变压器状态检测技术领域,具体涉及一种变压器油老化检测方法、检测系统、电子设备及可读存储介质。The invention belongs to the technical field of transformer state detection, and in particular relates to a transformer oil aging detection method, a detection system, electronic equipment and a readable storage medium.
背景技术Background technique
作为电力系统的关键设备,变压器的正常运行是保障电力稳定和提高电能质量的必要条件。变压器的寿命与其绝缘材料的绝缘性能具有较大的相关性,然而随着变压器投入运行时间累积,变压器油的品质逐渐下降,油的颜色也从一开始的透明色逐渐变暗,当出现沉淀物时表示老化已经很严重,绝缘性能较差。随着老化程度逐渐加深,有可能造成变压器的不安全运行,乃至引起较为严重的故障,威胁电力系统的稳定。As a key equipment in the power system, the normal operation of the transformer is a necessary condition for ensuring power stability and improving power quality. The life of a transformer has a great correlation with the insulation performance of its insulating material. However, as the transformer is put into operation and accumulated, the quality of the transformer oil gradually declines, and the color of the oil gradually darkens from the initial transparent color. It means that the aging has been very serious and the insulation performance is poor. As the aging degree gradually deepens, it may cause unsafe operation of the transformer, and even cause more serious faults, threatening the stability of the power system.
国内外诸多学者从事变压器油老化状态的检测方法研究,现有的变压器油老化状态检测方法有直接法和间接法,其中间接法是通过间接检测其它物质的含量来确定变压器油的老化状态如检测糠醛的含量或是油中特征气体的含量,而直接法是通过直接检测变压器油的理化性质来判断老化状态如光谱检测技术。相较于其它的老化检测方法,光谱检测技术因可以实现非接触式检测而在变压器油老化的检测过程中应用较多,在这其中鉴于高光谱技术具有光谱分辨率高、波段多等突出特点而备受青睐。由于出现绝缘老化现象时,油的性质已经发生了变化,而高光谱技术就是利用不同物质成分高光谱谱线的差异来实现检测的目的。通过对变压器油老化的检测,可以及时掌握变压器的工作状态,方便后续进行维护与检修的操作。Many scholars at home and abroad are engaged in the research on the detection method of transformer oil aging state. The existing detection methods of transformer oil aging state include direct method and indirect method. The indirect method is to determine the aging state of transformer oil through indirect detection of the content of other substances. The content of furfural or the content of characteristic gases in oil, and the direct method is to judge the aging state by directly detecting the physical and chemical properties of transformer oil, such as spectral detection technology. Compared with other aging detection methods, spectral detection technology is widely used in the detection process of transformer oil aging because it can realize non-contact detection. Among them, hyperspectral technology has the outstanding characteristics of high spectral resolution and multiple bands. And favored. Due to the phenomenon of insulation aging, the properties of the oil have changed, and the hyperspectral technology uses the difference in the hyperspectral lines of different material components to achieve the purpose of detection. Through the detection of transformer oil aging, the working status of the transformer can be grasped in time, which is convenient for subsequent maintenance and repair operations.
发明内容Contents of the invention
为解决上述方案存在的问题,本发明提供了一种变压器油老化检测方法、检测系统、电子设备及可读存储介质,用于监督和检测变压器的老化状态,便于及时掌握变压器设备的运行状态和安排检修等后续操作的进行。In order to solve the problems in the above solutions, the present invention provides a transformer oil aging detection method, detection system, electronic equipment and readable storage medium, which are used to monitor and detect the aging state of transformers, so as to facilitate timely grasp of the operating state and Arrange maintenance and other follow-up operations.
本发明的目的可以通过以下技术方案实现:The purpose of the present invention can be achieved through the following technical solutions:
提供一种变压器油老化检测方法,其包括以下步骤:Provide a kind of transformer oil aging detection method, it comprises the following steps:
S1、获取不同老化程度绝缘油样本的高光谱图像数据;S1. Obtain hyperspectral image data of insulating oil samples with different aging degrees;
S2、对获得的高光谱图像数据进行特征选择与处理操作;S2. Perform feature selection and processing operations on the obtained hyperspectral image data;
S3、利用处理后的数据构建Stacking集成学习模型,对待测油样进行检测,将获得的特征数据输入已构建的Stacking集成学习模型中,获得最终的预测结果,即可用来检测变压器油的状况。S3. Use the processed data to build a Stacking integrated learning model, detect the oil sample to be tested, input the obtained characteristic data into the built Stacking integrated learning model, and obtain the final prediction result, which can be used to detect the condition of the transformer oil.
进一步地,步骤S1包括以下步骤:令绝缘油在恒温老化箱中进行加速老化,根据不同的老化时间制备不同老化程度的绝缘油试样;Further, step S1 includes the following steps: making the insulating oil undergo accelerated aging in a constant temperature aging box, and preparing insulating oil samples of different aging degrees according to different aging times;
进一步地,步骤S2包括以下步骤:Further, step S2 includes the following steps:
S31:利用高光谱成像仪对待测样品进行图像采集,得到样本原始的高光谱图像数据;S31: Using a hyperspectral imager to collect images of the sample to be tested to obtain original hyperspectral image data of the sample;
S32:将得到的高光谱谱线数据信息进行预处理操作,包括黑白校正、多元散射校正以及平滑去燥等操作。S32: Perform preprocessing operations on the obtained hyperspectral line data information, including operations such as black and white correction, multivariate scattering correction, and smoothing and denoising.
进一步地,具体包括以下步骤:Further, it specifically includes the following steps:
S41:随机抽取一定样本建立PLS模型,计算回归系数的绝对值和每个波段点的权值;S41: Randomly select a certain sample to establish a PLS model, and calculate the absolute value of the regression coefficient and the weight of each band point;
S42:利用EDP和ARS进行变量选择,并计算交叉验证的均方根误差值;S42: Use EDP and ARS to select variables, and calculate the root mean square error value of cross-validation;
S43:选取蒙特卡罗次数,比较100个RMSECV,选取其中最小的子集作为最优特征变量。S43: Select the Monte Carlo times, compare 100 RMSECVs, and select the smallest subset among them as the optimal feature variable.
进一步地,步骤S3中特征选取与处理的操作主要是对提取后的特征量进行降维处理,PCA降维处理的步骤有:Further, the operation of feature selection and processing in step S3 is mainly to perform dimensionality reduction processing on the extracted feature quantities, and the steps of PCA dimensionality reduction processing include:
S51:计算n个特征数据集的协方差矩阵并求解矩阵的特征值与特征向量;S51: Calculate the covariance matrix of n characteristic data sets and solve the eigenvalue and eigenvector of the matrix;
S52:将特征值按从大到小排序,选取最大的k个特征对应的特征向量构成映射矩阵,由此将原始n个特征降维转化为k个特征。S52: Sort the eigenvalues from large to small, and select the eigenvectors corresponding to the largest k features to form a mapping matrix, thereby reducing the dimensionality of the original n features into k features.
进一步地,步骤S3包括以下步骤:Further, step S3 includes the following steps:
S61:将预处理后的高光谱谱线按照8:2的比例划分为训练集和测试集,并对模型进行训练;S61: Divide the preprocessed hyperspectral lines into a training set and a test set according to a ratio of 8:2, and train the model;
S62:选择决策树、SVM、ANN作为基学习器,由于随机森林泛化能力强,故选择其作为元分类器进行融合模型训练,由基学习器提取主要特征,再由元学习器融合,最终生成老化预测结果;S62: Select decision tree, SVM, and ANN as the base learner. Due to the strong generalization ability of random forest, it is selected as the meta-classifier for fusion model training. The main features are extracted by the base learner, and then fused by the meta-learner. Generate aging prediction results;
所述步骤S62中关于基学习器决策树具体包括两个阶段,生成与剪枝,其剪枝便是通过优化损失函数来实现,设树T的叶节点个数为|T|,t是树T的叶节点,该叶节点有Nt个样本点,其中k类的样本点个数是Ntk个,k=1,2,…,K,Ht(T)为该叶节点的信息熵,α为参数且(α≥0),则决策树损失函数可定义为(每个叶子节点的样本点数量与该节点的信息熵相乘,最后加上正则项):The decision tree of the base learner in the step S62 specifically includes two stages, generation and pruning, and the pruning is realized by optimizing the loss function. Let the number of leaf nodes of the tree T be |T|, and t is the tree The leaf node of T, the leaf node has N t sample points, and the number of sample points of class k is N tk , k=1,2,...,K,H t (T) is the information entropy of the leaf node , α is a parameter and (α≥0), the decision tree loss function can be defined as (the number of sample points of each leaf node is multiplied by the information entropy of the node, and finally a regular term is added):
,所述步骤S62中关于基学习器SVM寻求最佳分类超平面的具体实施步骤如下:假定训练样本Di=(xi,yi),i=1,2,......n,yi={1,-1},其中,xi表示源数据,yi表示类别值,超平面为w*x+b=0,定义超平面与样本点的几何间隔为可将其转化为求解带约束条件的最小值问题:, in the step S62, the specific implementation steps of seeking the best classification hyperplane about the base learner SVM are as follows: assume that the training samples Di=(xi, yi), i=1,2,...n, yi= {1,-1}, where xi represents the source data, yi represents the category value, the hyperplane is w*x+b=0, and the geometric interval between the hyperplane and the sample point is defined as This can be transformed into solving a constrained minimum problem:
st.yi[w(xi)+b]-1≥0,i=1,2,......lst.y i [w(x i )+b]-1≥0, i=1,2,...l
损失函数的计算方法为其中i代表第i个样本数据,j代表第j类,yi代表第i个样本的真实类别,通常的,sj=xiwj,将损失值推广至整个训练集可知, The calculation method of the loss function is Where i represents the i-th sample data, j represents the j-th class, and yi represents the true category of the i-th sample. Usually, s j = x i w j , and the loss value can be extended to the entire training set.
所述步骤S62中关于基学习器ANN结构包括输入层、隐藏层以及输出层,选取作为激活函数,将其损失函数定义为输出向量的均方误差,即:其中表示输出向量第i个元素与标签第i个元素的差值。In the step S62, the ANN structure of the base learner includes an input layer, a hidden layer and an output layer, select As an activation function, its loss function is defined as the mean square error of the output vector, namely: in Indicates the difference between the i-th element of the output vector and the i-th element of the label.
进一步地,步骤S62包括以下步骤:Further, step S62 includes the following steps:
S71:将训练集输入不同基模型中进行训练,并在测试集上获得相应的预测结果;S71: Input the training set into different base models for training, and obtain corresponding prediction results on the test set;
S72:将基模型的预测结果作为特征应用到元模型,并将基模型在测试集的平均预测值作为元模型的测试集输入元模型中进行训练与拟合,训练出最终的老化检测模型。S72: Apply the prediction result of the base model as a feature to the meta-model, and input the average prediction value of the base model in the test set as the test set of the meta-model into the meta-model for training and fitting, and train a final aging detection model.
进一步地,黑白校正的公式为:Further, the formula for black and white correction is:
式中TA为校正后的高光谱图像数据,T为校正前的高光谱图像数据,TB为标准的黑图像数据,TW为标准的白图像数据。In the formula, T A is the hyperspectral image data after correction, T is the hyperspectral image data before correction, T B is the standard black image data, and T W is the standard white image data.
进一步地,多元散射校正的具体实现方法为:Further, the specific implementation method of multivariate scattering correction is:
S91:求得平均光谱数据值:S91: obtain the average spectral data value:
S92:将每个光谱与平均光谱进行一元线性回归:S92: Perform a linear regression of each spectrum with the mean spectrum:
S93:校正后的光谱数据:S93: Corrected spectral data:
提供一种变压器油老化检测电子设备,其包括:A transformer oil aging detection electronic device is provided, which includes:
存储器,存储有可执行指令;以及a memory storing executable instructions; and
处理器,被配置为执行所述存储器中可执行指令以实现权利要求1~9中任一项所述的基于Stacking集成学习的变压器油老化方法。A processor configured to execute executable instructions in the memory to implement the method for aging transformer oil based on Stacking integrated learning according to any one of claims 1-9.
提供一种可读存储介质,其上存储有可执行指令,可执行指令被处理器执行时实现基于Stacking集成学习的变压器油老化方法。A readable storage medium is provided, on which executable instructions are stored, and when the executable instructions are executed by a processor, a method for aging transformer oil based on Stacking integrated learning is realized.
提供一种变压器油老化检测系统,其包括:A transformer oil aging detection system is provided, which includes:
高光谱图像数据获取模块,用于获取不同老化程度绝缘油样本的高光谱图像数据;The hyperspectral image data acquisition module is used to acquire hyperspectral image data of insulating oil samples with different aging degrees;
特征选择与处理操作模块,用于对获得的高光谱图像数据进行特征选择与处理操作;The feature selection and processing operation module is used to perform feature selection and processing operations on the obtained hyperspectral image data;
检测模块,利用处理后的数据构建Stacking集成学习模型,对待测油样进行检测,将获得的特征数据输入已构建的Stacking集成学习模型中,获得最终的预测结果,即可用来检测得到变压器油的状况。The detection module uses the processed data to build a Stacking integrated learning model, detects the oil samples to be tested, and inputs the obtained characteristic data into the built Stacking integrated learning model to obtain the final prediction result, which can be used to detect the transformer oil. situation.
进一步地,检测模块包括:Further, the detection module includes:
训练集划分子模块,用于将预处理后的高光谱谱线按照8:2的比例划分为训练集和测试集;The training set is divided into submodules, which are used to divide the preprocessed hyperspectral lines into a training set and a test set according to a ratio of 8:2;
模型训练子模块,用于将训练集输入不同基模型中进行训练,并在测试集上获得相应的预测结果;将基模型的预测结果作为特征应用到元模型,并将基模型在测试集的平均预测值作为元模型的测试集输入元模型中进行训练与拟合,训练出最终的老化检测模型;The model training sub-module is used to input the training set into different base models for training, and obtain corresponding prediction results on the test set; apply the prediction results of the base model as features to the meta-model, and use the base model in the test set The average predicted value is input into the meta-model as the test set of the meta-model for training and fitting, and the final aging detection model is trained;
老化预测结果生成子模块,用于选择决策树、SVM、ANN作为基学习器,由于随机森林泛化能力强,故选择其作为元分类器进行融合模型训练,由基学习器提取主要特征,再由元学习器融合,最终生成老化预测结果;The aging prediction result generation sub-module is used to select decision tree, SVM, ANN as the base learner. Due to the strong generalization ability of random forest, it is selected as the meta-classifier for fusion model training, and the main features are extracted by the base learner, and then Fusion by meta-learners to finally generate aging prediction results;
其中基学习器决策树具体包括两个阶段,生成与剪枝,其剪枝便是通过优化损失函数来实现,设树T的叶节点个数为|T|,t是树T的叶节点,该叶节点有Nt个样本点,其中k类的样本点个数是Ntk个,k=1,2,…,K,Ht(T)为该叶节点的信息熵,α为参数且(α≥0),则决策树损失函数可定义为(每个叶子节点的样本点数量与该节点的信息熵相乘,最后加上正则项):The base learner decision tree specifically includes two stages, generation and pruning. The pruning is realized by optimizing the loss function. Let the number of leaf nodes of the tree T be |T|, t is the leaf node of the tree T, The leaf node has N t sample points, wherein the number of sample points of class k is N tk , k=1,2,...,K,H t (T) is the information entropy of the leaf node, α is a parameter and (α≥0), the decision tree loss function can be defined as (the number of sample points of each leaf node is multiplied by the information entropy of the node, and finally the regular term is added):
基学习器SVM寻求最佳分类超平面的具体实施步骤如下:假定训练样本Di=(xi,yi),i=1,2,......n,yi={1,-1},其中,xi表示源数据,yi表示类别值,超平面为w*x+b=0,定义超平面与样本点的几何间隔为可将其转化为求解带约束条件的最小值问题:The specific implementation steps for the base learner SVM to seek the best classification hyperplane are as follows: Assuming training samples Di=(xi,yi),i=1,2,...n,yi={1,-1}, Among them, xi represents the source data, yi represents the category value, the hyperplane is w*x+b=0, and the geometric interval between the hyperplane and the sample point is defined as This can be transformed into solving a constrained minimum problem:
st.yi[w(xi)+b]-1≥0,i=1,2,......lst.y i [w(x i )+b]-1≥0, i=1,2,...l
损失函数的计算方法为其中i代表第i个样本数据,j代表第j类,yi代表第i个样本的真实类别,通常的,sj=xiwj,将损失值推广至整个训练集可知, The calculation method of the loss function is Where i represents the i-th sample data, j represents the j-th class, and yi represents the true category of the i-th sample. Usually, s j = x i w j , and the loss value can be extended to the entire training set.
基学习器ANN结构包括输入层、隐藏层以及输出层,选取作为激活函数,将其损失函数定义为输出向量的均方误差,即:其中表示输出向量第i个元素与标签第i个元素的差值。The basic learner ANN structure includes input layer, hidden layer and output layer, select As an activation function, its loss function is defined as the mean square error of the output vector, namely: in Indicates the difference between the i-th element of the output vector and the i-th element of the label.
与现有变压器油老化的检测技术相比,本发明的有效益处是:第一、可以实现对变压器油老化的在线检测;二、理论上,该集成学习方法能够融合各个分类器的准确性与差异性,提高模型的学习能力和泛化能力;三、对变压器油老化的研究旨在深入研究老化过程的微观与宏观的联系,揭示变压器油的老化机理,为变压器油老化状态的评估给予科学的依据;四、高光谱技术在变压器油状态检测方面的应用可以为其他研究学习提供理论参考。Compared with the detection technology of existing transformer oil aging, the effective benefit of the present invention is: the first, can realize the on-line detection to transformer oil aging; difference, improve the learning ability and generalization ability of the model; 3. The research on the aging of transformer oil aims to deeply study the relationship between the microcosmic and macroscopic aspects of the aging process, reveal the aging mechanism of transformer oil, and provide a scientific basis for the evaluation of the aging state of transformer oil. Fourth, the application of hyperspectral technology in transformer oil state detection can provide theoretical reference for other research and study.
附图说明Description of drawings
为了更清楚地说明本发明实施例或技术方案,下面将对实施例或技术方案中所需要使用的附图作简单介绍,显而易见的,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员而言,在不付出创造性劳动的前提下,还可以依据这些附图获得其他的附图。In order to illustrate the embodiments or technical solutions of the present invention more clearly, the following will briefly introduce the accompanying drawings used in the embodiments or technical solutions. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained based on these drawings without creative effort.
图1为本发明中一种变压器油老化检测方法的示意图。Fig. 1 is a schematic diagram of a transformer oil aging detection method in the present invention.
具体实施方式detailed description
下面将结合实施例对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例仅为本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
在具体实施过程中,如图1所示,该变压器油老化检测方法包括以下步骤:In the specific implementation process, as shown in Figure 1, the transformer oil aging detection method includes the following steps:
S1、获取不同老化程度绝缘油样本的高光谱图像数据;S1. Obtain hyperspectral image data of insulating oil samples with different aging degrees;
S2、对获得的高光谱图像数据进行特征选择与处理操作;S2. Perform feature selection and processing operations on the obtained hyperspectral image data;
S3、利用处理后的数据构建Stacking集成学习模型,对待测油样进行检测,将获得的特征数据输入已构建的Stacking集成学习模型中,获得最终的预测结果,即可用来检测变压器油的状况。S3. Use the processed data to build a Stacking integrated learning model, detect the oil sample to be tested, input the obtained characteristic data into the built Stacking integrated learning model, and obtain the final prediction result, which can be used to detect the condition of the transformer oil.
步骤S1包括以下步骤:令绝缘油在恒温老化箱中进行加速老化,根据不同的老化时间制备不同老化程度的绝缘油试样;Step S1 includes the following steps: making the insulating oil undergo accelerated aging in a constant temperature aging box, and preparing insulating oil samples of different aging degrees according to different aging times;
步骤S2以下步骤:Step S2 following steps:
S31:利用高光谱成像仪对待测样品进行图像采集,得到样本原始的高光谱图像数据;S31: Using a hyperspectral imager to collect images of the sample to be tested to obtain original hyperspectral image data of the sample;
S32:将得到的高光谱谱线数据信息进行预处理操作,包括黑白校正、多元散射校正以及平滑去燥等操作。S32: Perform preprocessing operations on the obtained hyperspectral line data information, including operations such as black and white correction, multivariate scattering correction, and smoothing and denoising.
具体包括以下步骤:Specifically include the following steps:
S41:随机抽取一定样本建立PLS模型,计算回归系数的绝对值和每个波段点的权值;S41: Randomly select a certain sample to establish a PLS model, and calculate the absolute value of the regression coefficient and the weight of each band point;
S42:利用EDP和ARS进行变量选择,并计算交叉验证的均方根误差值;S42: Use EDP and ARS to select variables, and calculate the root mean square error value of cross-validation;
S43:选取蒙特卡罗次数,比较100个RMSECV,选取其中最小的子集作为最优特征变量。S43: Select the Monte Carlo times, compare 100 RMSECVs, and select the smallest subset among them as the optimal feature variable.
步骤S3中特征选取与处理的操作主要是对提取后的特征量进行降维处理,PCA降维处理的步骤有:The operation of feature selection and processing in step S3 is mainly to perform dimensionality reduction processing on the extracted feature quantities, and the steps of PCA dimensionality reduction processing include:
S51:计算n个特征数据集的协方差矩阵并求解矩阵的特征值与特征向量;S51: Calculate the covariance matrix of n characteristic data sets and solve the eigenvalue and eigenvector of the matrix;
S52:将特征值按从大到小排序,选取最大的k个特征对应的特征向量构成映射矩阵,由此将原始n个特征降维转化为k个特征。S52: Sort the eigenvalues from large to small, and select the eigenvectors corresponding to the largest k features to form a mapping matrix, thereby reducing the dimensionality of the original n features into k features.
步骤S3包括以下步骤:Step S3 comprises the following steps:
S61:将预处理后的高光谱谱线按照8:2的比例划分为训练集和测试集,并对模型进行训练;S61: Divide the preprocessed hyperspectral lines into a training set and a test set according to a ratio of 8:2, and train the model;
S62:选择决策树、SVM、ANN作为基学习器,由于随机森林泛化能力强,故选择其作为元分类器进行融合模型训练,由基学习器提取主要特征,再由元学习器融合,最终生成老化预测结果;S62: Select decision tree, SVM, and ANN as the base learner. Due to the strong generalization ability of random forest, it is selected as the meta-classifier for fusion model training. The main features are extracted by the base learner, and then fused by the meta-learner. Generate aging prediction results;
所述步骤S62中关于基学习器决策树具体包括两个阶段,生成与剪枝,其剪枝便是通过优化损失函数来实现,设树T的叶节点个数为|T|,t是树T的叶节点,该叶节点有Nt个样本点,其中k类的样本点个数是Ntk个,k=1,2,…,K,Ht(T)为该叶节点的信息熵,α为参数且(α≥0),则决策树损失函数可定义为(每个叶子节点的样本点数量与该节点的信息熵相乘,最后加上正则项):The decision tree of the base learner in the step S62 specifically includes two stages, generation and pruning, and the pruning is realized by optimizing the loss function. Let the number of leaf nodes of the tree T be |T|, and t is the tree The leaf node of T, the leaf node has N t sample points, and the number of sample points of class k is N tk , k=1,2,...,K,H t (T) is the information entropy of the leaf node , α is a parameter and (α≥0), the decision tree loss function can be defined as (the number of sample points of each leaf node is multiplied by the information entropy of the node, and finally a regular term is added):
,所述步骤S62中关于基学习器SVM寻求最佳分类超平面的具体实施步骤如下:假定训练样本Di=(xi,yi),i=1,2,......n,yi={1,-1},其中,xi表示源数据,yi表示类别值,超平面为w*x+b=0,定义超平面与样本点的几何间隔为可将其转化为求解带约束条件的最小值问题:, in the step S62, the specific implementation steps of seeking the best classification hyperplane about the base learner SVM are as follows: assume that the training samples Di=(xi, yi), i=1,2,...n, yi= {1,-1}, where xi represents the source data, yi represents the category value, the hyperplane is w*x+b=0, and the geometric interval between the hyperplane and the sample point is defined as This can be transformed into solving a constrained minimum problem:
st.yi[w(xi)+b]-1≥0,i=1,2,......lst.y i [w(x i )+b]-1≥0, i=1,2,...l
损失函数的计算方法为其中i代表第i个样本数据,j代表第j类,yi代表第i个样本的真实类别,通常的,sj=xiwj,将损失值推广至整个训练集可知, The calculation method of the loss function is Where i represents the i-th sample data, j represents the j-th class, and yi represents the true category of the i-th sample. Usually, s j = x i w j , and the loss value can be extended to the entire training set.
所述步骤S62中关于基学习器ANN结构包括输入层、隐藏层以及输出层,选取作为激活函数,将其损失函数定义为输出向量的均方误差,即:其中表示输出向量第i个元素与标签第i个元素的差值。In the step S62, the ANN structure of the base learner includes an input layer, a hidden layer and an output layer, select As an activation function, its loss function is defined as the mean square error of the output vector, namely: in Indicates the difference between the i-th element of the output vector and the i-th element of the label.
步骤S62包括以下步骤:Step S62 comprises the following steps:
S71:将训练集输入不同基模型中进行训练,并在测试集上获得相应的预测结果;S71: Input the training set into different base models for training, and obtain corresponding prediction results on the test set;
S72:将基模型的预测结果作为特征应用到元模型,并将基模型在测试集的平均预测值作为元模型的测试集输入元模型中进行训练与拟合,训练出最终的老化检测模型。S72: Apply the prediction result of the base model as a feature to the meta-model, and input the average prediction value of the base model in the test set as the test set of the meta-model into the meta-model for training and fitting, and train a final aging detection model.
黑白校正的公式为:The formula for black and white correction is:
式中TA为校正后的高光谱图像数据,T为校正前的高光谱图像数据,TB为标准的黑图像数据,TW为标准的白图像数据。In the formula, T A is the hyperspectral image data after correction, T is the hyperspectral image data before correction, T B is the standard black image data, and T W is the standard white image data.
多元散射校正的具体实现方法为:The specific implementation method of multivariate scattering correction is as follows:
S91:求得平均光谱数据值:S91: obtain the average spectral data value:
S92:将每个光谱与平均光谱进行一元线性回归:S92: Perform a linear regression of each spectrum with the mean spectrum:
S93:校正后的光谱数据:S93: Corrected spectral data:
该变压器油老化检测电子设备,包括:The transformer oil aging detection electronic equipment includes:
存储器,存储有可执行指令;以及a memory storing executable instructions; and
处理器,被配置为执行所述存储器中可执行指令以实现权利要求1~9中任一项所述的基于Stacking集成学习的变压器油老化方法。A processor configured to execute executable instructions in the memory to implement the method for aging transformer oil based on Stacking integrated learning according to any one of claims 1-9.
该可读存储介质,其上存储有可执行指令,可执行指令被处理器执行时实现基于Stacking集成学习的变压器油老化方法。The readable storage medium has executable instructions stored thereon, and when the executable instructions are executed by a processor, the transformer oil aging method based on Stacking integrated learning is realized.
该变压器油老化检测系统包括:The transformer oil aging detection system includes:
高光谱图像数据获取模块,用于获取不同老化程度绝缘油样本的高光谱图像数据;The hyperspectral image data acquisition module is used to acquire hyperspectral image data of insulating oil samples with different aging degrees;
特征选择与处理操作模块,用于对获得的高光谱图像数据进行特征选择与处理操作;The feature selection and processing operation module is used to perform feature selection and processing operations on the obtained hyperspectral image data;
检测模块,利用处理后的数据构建Stacking集成学习模型,对待测油样进行检测,将获得的特征数据输入已构建的Stacking集成学习模型中,获得最终的预测结果,即可用来检测得到变压器油的状况。The detection module uses the processed data to build a Stacking integrated learning model, detects the oil samples to be tested, and inputs the obtained characteristic data into the built Stacking integrated learning model to obtain the final prediction result, which can be used to detect the transformer oil. situation.
检测模块包括:Detection modules include:
训练集划分子模块,用于将预处理后的高光谱谱线按照8:2的比例划分为训练集和测试集;The training set is divided into submodules, which are used to divide the preprocessed hyperspectral lines into a training set and a test set according to a ratio of 8:2;
模型训练子模块,用于将训练集输入不同基模型中进行训练,并在测试集上获得相应的预测结果;将基模型的预测结果作为特征应用到元模型,并将基模型在测试集的平均预测值作为元模型的测试集输入元模型中进行训练与拟合,训练出最终的老化检测模型;The model training sub-module is used to input the training set into different base models for training, and obtain corresponding prediction results on the test set; apply the prediction results of the base model as features to the meta-model, and use the base model in the test set The average predicted value is input into the meta-model as the test set of the meta-model for training and fitting, and the final aging detection model is trained;
老化预测结果生成子模块,用于选择决策树、SVM、ANN作为基学习器,由于随机森林泛化能力强,故选择其作为元分类器进行融合模型训练,由基学习器提取主要特征,再由元学习器融合,最终生成老化预测结果;The aging prediction result generation sub-module is used to select decision tree, SVM, ANN as the base learner. Due to the strong generalization ability of random forest, it is selected as the meta-classifier for fusion model training, and the main features are extracted by the base learner, and then Fusion by meta-learners to finally generate aging prediction results;
其中基学习器决策树具体包括两个阶段,生成与剪枝,其剪枝便是通过优化损失函数来实现,设树T的叶节点个数为|T|,t是树T的叶节点,该叶节点有Nt个样本点,其中k类的样本点个数是Ntk个,k=1,2,…,K,Ht(T)为该叶节点的信息熵,α为参数且(α≥0),则决策树损失函数可定义为(每个叶子节点的样本点数量与该节点的信息熵相乘,最后加上正则项):The base learner decision tree specifically includes two stages, generation and pruning. The pruning is realized by optimizing the loss function. Let the number of leaf nodes of the tree T be |T|, t is the leaf node of the tree T, The leaf node has N t sample points, wherein the number of sample points of class k is N tk , k=1,2,...,K,H t (T) is the information entropy of the leaf node, α is a parameter and (α≥0), the decision tree loss function can be defined as (the number of sample points of each leaf node is multiplied by the information entropy of the node, and finally the regular term is added):
基学习器SVM寻求最佳分类超平面的具体实施步骤如下:假定训练样本Di=(xi,yi),i=1,2,......n,yi={1,-1},其中,xi表示源数据,yi表示类别值,超平面为w*x+b=0,定义超平面与样本点的几何间隔为可将其转化为求解带约束条件的最小值问题:The specific implementation steps for the base learner SVM to seek the best classification hyperplane are as follows: Assuming training samples Di=(xi,yi),i=1,2,...n,yi={1,-1}, Among them, xi represents the source data, yi represents the category value, the hyperplane is w*x+b=0, and the geometric interval between the hyperplane and the sample point is defined as This can be transformed into solving a constrained minimum problem:
st.yi[w(xi)+b]-1≥0,i=1,2,......lst.y i [w(x i )+b]-1≥0, i=1,2,...l
损失函数的计算方法为其中i代表第i个样本数据,j代表第j类,yi代表第i个样本的真实类别,通常的,sj=xiwj,将损失值推广至整个训练集可知, The calculation method of the loss function is Where i represents the i-th sample data, j represents the j-th class, and yi represents the true category of the i-th sample. Usually, s j = x i w j , and the loss value can be extended to the entire training set.
基学习器ANN结构包括输入层、隐藏层以及输出层,选取作为激活函数,将其损失函数定义为输出向量的均方误差,即:其中表示输出向量第i个元素与标签第i个元素的差值。The basic learner ANN structure includes input layer, hidden layer and output layer, select As an activation function, its loss function is defined as the mean square error of the output vector, namely: in Indicates the difference between the i-th element of the output vector and the i-th element of the label.
在具体实施过程中,所述Stacking集成模型流程包括以下步骤:In the specific implementation process, the Stacking integration model process includes the following steps:
S1:将预处理后的高光谱谱线按照8:2的比例划分为训练集和测试集;S1: Divide the preprocessed hyperspectral lines into a training set and a test set in a ratio of 8:2;
S2:把决策树、SVM、ANN分别作为基学习器,由于随机森林泛化能力强,故选择其作为元分类器进行融合模型训练,由基学习器提取主要特征,再由元学习器融合,最终生成老化预测结果;S2: The decision tree, SVM, and ANN are used as the base learner respectively. Due to the strong generalization ability of the random forest, it is selected as the meta-classifier for fusion model training. The main features are extracted by the base learner, and then fused by the meta-learner. Finally, the aging prediction result is generated;
具体的,所述模型训练过程包括以下步骤:Specifically, the model training process includes the following steps:
S1:将训练集输入不同基模型中进行训练,并在测试集上获得相应的预测结果;S1: Input the training set into different base models for training, and obtain corresponding prediction results on the test set;
S2:将基模型得到的特征作为训练集输入元模型,并将基模型在测试集的平均预测值作为元模型的测试集输入元模型中进行训练与拟合,得到最终的老化检测结果。S2: Input the features obtained from the base model as the training set into the meta-model, and use the average predicted value of the base model in the test set as the test set of the meta-model into the meta-model for training and fitting to obtain the final aging detection result.
特别的,选取决定系数、均方根误差以及平均绝对误差为评价指标对各模型的检测情况进行分析与评估,验证集成模型的预测能力是否优于单一分类器。In particular, the coefficient of determination, root mean square error, and mean absolute error are selected as evaluation indicators to analyze and evaluate the detection situation of each model, and to verify whether the predictive ability of the integrated model is better than that of a single classifier.
Claims (13)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210720475 | 2022-06-23 | ||
CN2022107204752 | 2022-06-23 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115565028A true CN115565028A (en) | 2023-01-03 |
Family
ID=84741997
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211128233.0A Pending CN115565028A (en) | 2022-06-23 | 2022-09-16 | Transformer oil aging detection method, detection system, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115565028A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117077043A (en) * | 2023-10-17 | 2023-11-17 | 深圳翱翔锐影科技有限公司 | Evaluation method of CdZnTe photon counting detector based on leakage current response |
CN118243665A (en) * | 2024-04-01 | 2024-06-25 | 国网宁夏电力有限公司电力科学研究院 | A flow-type detection device for transformer oil quality |
-
2022
- 2022-09-16 CN CN202211128233.0A patent/CN115565028A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117077043A (en) * | 2023-10-17 | 2023-11-17 | 深圳翱翔锐影科技有限公司 | Evaluation method of CdZnTe photon counting detector based on leakage current response |
CN117077043B (en) * | 2023-10-17 | 2024-01-30 | 深圳翱翔锐影科技有限公司 | Evaluation method of CdZnTe photon counting detector based on leakage current response |
CN118243665A (en) * | 2024-04-01 | 2024-06-25 | 国网宁夏电力有限公司电力科学研究院 | A flow-type detection device for transformer oil quality |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114926746B (en) | SAR image change detection method based on multiscale differential feature attention mechanism | |
CN112613536B (en) | Near infrared spectrum diesel fuel brand recognition method based on SMOTE and deep learning | |
CN110717368A (en) | Qualitative classification method for textiles | |
CN103632160B (en) | Combined kernel function RVM hyperspectral classification method fusing multi-scale morphological characteristics | |
CN115565028A (en) | Transformer oil aging detection method, detection system, electronic equipment and readable storage medium | |
CN105158200B (en) | A kind of modeling method for improving the Qualitative Analysis of Near Infrared Spectroscopy degree of accuracy | |
CN104268556A (en) | Hyperspectral image classification method based on nuclear low-rank representing graph and spatial constraint | |
CN109460471B (en) | Method for establishing fiber category map library based on self-learning mode | |
CN109376805A (en) | A classification method based on the fingerprint characteristics of liquor base wine | |
CN110874576B (en) | Pedestrian re-identification method based on typical correlation analysis fusion characteristics | |
CN104866871A (en) | Projection structure sparse coding-based hyperspectral image classification method | |
CN117219124B (en) | Switch cabinet voiceprint fault detection method based on deep neural network | |
CN115424006A (en) | Multi-source multi-level data fusion method applied to crop phenotypic parameter inversion | |
CN112766223A (en) | Hyperspectral image target detection method based on sample mining and background reconstruction | |
CN114548212A (en) | A method and system for evaluating water quality | |
CN113378971A (en) | Near infrared spectrum classification model training method and system and classification method and system | |
CN112926625A (en) | Method for analyzing deviation influence factors of satellite radiation data | |
CN103955711A (en) | Mode recognition method in imaging spectrum object recognition analysis | |
CN117929356B (en) | LIBS quantitative analysis method based on Gaussian process regression | |
CN113962327A (en) | Data classification method and device and electronic equipment | |
CN113988519A (en) | Method for representing risk of cultural relic preservation environment in collection of cultural relics | |
CN111125629B (en) | Domain-adaptive PLS regression model modeling method | |
CN110887798B (en) | Nonlinear full-spectrum water turbidity quantitative analysis method based on extreme random tree | |
CN117789038A (en) | Training method of data processing and recognition model based on machine learning | |
CN117171641A (en) | Gas concentration prediction method based on improved DBSCAN algorithm and multi-scale LSTM neural network |
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 |