CN115841278B - Evaluation method, system, equipment and medium for operating error state of electric energy metering device - Google Patents

Evaluation method, system, equipment and medium for operating error state of electric energy metering device Download PDF

Info

Publication number
CN115841278B
CN115841278B CN202310000732.XA CN202310000732A CN115841278B CN 115841278 B CN115841278 B CN 115841278B CN 202310000732 A CN202310000732 A CN 202310000732A CN 115841278 B CN115841278 B CN 115841278B
Authority
CN
China
Prior art keywords
phase
curve
feature
cosine similarity
kurtosis
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
CN202310000732.XA
Other languages
Chinese (zh)
Other versions
CN115841278A (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.)
State Grid Fujian Electric Power Co Ltd
Marketing Service Center of State Grid Fujian Electric Power Co Ltd
Original Assignee
State Grid Fujian Electric Power Co Ltd
Marketing Service Center of State Grid Fujian Electric Power Co Ltd
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 State Grid Fujian Electric Power Co Ltd, Marketing Service Center of State Grid Fujian Electric Power Co Ltd filed Critical State Grid Fujian Electric Power Co Ltd
Priority to CN202310000732.XA priority Critical patent/CN115841278B/en
Publication of CN115841278A publication Critical patent/CN115841278A/en
Application granted granted Critical
Publication of CN115841278B publication Critical patent/CN115841278B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/80Management or planning
    • Y02P90/82Energy audits or management systems therefor

Landscapes

  • Supply And Distribution Of Alternating Current (AREA)

Abstract

本发明涉及一种电能计量装置运行误差状态评价方法、系统、设备及介质,其中方法包括以下步骤:采集若干电能计量装置的历史运行监测数据,每一历史运行监测数据包括电能计量装置运行过程中产生的多个不同种类的物理量;对采集的每一历史运行监测数据进行特征提取,包括构造特征和特征选择两个步骤,得到最终特征集;对每一历史运行监测数据的最终特征集添加误差状态标签,形成训练样本,构建神经网络模型,通过训练样本对所述神经网络模型进行训练得到电能计量装置运行误差状态评价模型;获取目标电能计量装置当前的最终特征集,输入至训练好的电能计量装置运行误差状态评价模型得到目标电能计量装置的误差状态评价结果。

The invention relates to a method, system, equipment and medium for evaluating the operation error state of an electric energy metering device, wherein the method includes the following steps: collecting historical operation monitoring data of several electric energy metering devices, each historical operation monitoring data includes Generate multiple different types of physical quantities; perform feature extraction on each historical operation monitoring data collected, including two steps of constructing features and feature selection, to obtain the final feature set; add errors to the final feature set of each historical operation monitoring data The state label forms a training sample, constructs a neural network model, trains the neural network model through the training sample to obtain an evaluation model of the operating error state of the electric energy metering device; obtains the current final feature set of the target electric energy metering device, and inputs it into the trained electric energy The error state evaluation model of the metering device operation obtains the error state evaluation results of the target electric energy metering device.

Description

电能计量装置运行误差状态评价方法、系统、设备及介质Method, system, equipment and medium for evaluating operation error state of electric energy metering device

技术领域Technical Field

本发明涉及一种电能计量装置运行误差状态评价方法、系统、设备及介质,属于电力计量装置状态评价技术领域。The invention relates to a method, system, equipment and medium for evaluating the operating error state of an electric energy metering device, and belongs to the technical field of power metering device state evaluation.

背景技术Background Art

电能计量装置是测量电能量的重要设备,它们在电力系统的各环节的使用都相当广泛,为供电费核算、电量测量等方面能提供完善的依据。由于各种类型的因素及风险,譬如接线错误、通信较差、参数设置错误等都会影响电能计量装置的正常使用,上述或其他故障或缺陷会对电能计量装置的正常运行带来严重问题,最终影响到电能计量装置的精确性。对电能计量装置进行状态评价是研究电能计量装置一种重要的手段,准确的状态评价结果能够清晰地反映出电能计量装置运行时的状态,实现公司电能计量装置由传统周期管控到未来智慧管控的变革。Electric energy metering devices are important equipment for measuring electric energy. They are widely used in all aspects of the power system and can provide a perfect basis for power supply fee calculation, electricity measurement, etc. Due to various types of factors and risks, such as wiring errors, poor communication, parameter setting errors, etc., the normal use of electric energy metering devices will be affected. The above or other faults or defects will cause serious problems for the normal operation of the electric energy metering device, and ultimately affect the accuracy of the electric energy metering device. Status evaluation of electric energy metering devices is an important means of studying electric energy metering devices. Accurate status evaluation results can clearly reflect the status of the electric energy metering device during operation, and realize the transformation of the company's electric energy metering devices from traditional periodic control to future intelligent control.

现有技术公开号为“CN114065605A”的发明专利公开了一种智能电能表运行状态检测评估系统和方法,该方法步骤包括:S1:获取智能电能表的多个误差状态数据,记为智能电能表历史数据;S2:分别对多个误差状态数据先后进行量化处理和归一化处理;S3:对归一化处理后的数据进行归一化评价加权,按照预设阈值进行状态评定,评定结果记为性能退化数据;S4:对性能退化数据和智能电能表历史数据进行数据预处理,获得训练数据;S5:建立检测评估模型,并以训练数据进行模型训练,获得最优检测评估模型;S6:将待检测智能电能表的误差状态数据代入最优检测评估模型,获取待检测智能电能表运行状态检测评估结果。该现有技术可以对智能电能表运行状态及性能退化失效预计的科学评价。The prior art patent with the publication number of "CN114065605A" discloses a system and method for detecting and evaluating the operation status of a smart electric energy meter. The method comprises the following steps: S1: obtaining multiple error state data of the smart electric energy meter, and recording them as the historical data of the smart electric energy meter; S2: performing quantization and normalization processing on the multiple error state data respectively; S3: performing normalization evaluation weighting on the normalized data, and performing state evaluation according to a preset threshold, and recording the evaluation result as performance degradation data; S4: performing data preprocessing on the performance degradation data and the historical data of the smart electric energy meter to obtain training data; S5: establishing a detection and evaluation model, and training the model with the training data to obtain the optimal detection and evaluation model; S6: substituting the error state data of the smart electric energy meter to be detected into the optimal detection and evaluation model to obtain the detection and evaluation result of the operation status of the smart electric energy meter to be detected. The prior art can scientifically evaluate the operation status of the smart electric energy meter and the prediction of performance degradation failure.

上述现有技术的评价指标也就是电能表的误差状态数据采用的是包括表型选择误差、基本误差、运行误差、运行时间误差、运行故障率误差、运行监测事件误差、运行监测异常误差、误差分散性误差、全检退货率误差、运行质量抽检误差、铅封状态误差、安装环境误差和用户信誉误差等大量人为干预数据,从而导致电能表的误差状态评价与人为干预强相关,不够客观可靠。The evaluation index of the above-mentioned prior art, that is, the error status data of the electric energy meter, adopts a large amount of human intervention data including meter type selection error, basic error, operation error, operation time error, operation failure rate error, operation monitoring event error, operation monitoring abnormality error, error dispersion error, full inspection return rate error, operation quality sampling error, lead seal status error, installation environment error and user reputation error, which leads to the error status evaluation of the electric energy meter being strongly correlated with human intervention and not being objective and reliable enough.

发明内容Summary of the invention

为了解决上述现有技术中存在的问题,本发明提出了一种电能计量装置运行误差状态评价方法、系统、设备及介质。In order to solve the above problems existing in the prior art, the present invention proposes a method, system, equipment and medium for evaluating the operating error state of an electric energy metering device.

本发明的技术方案如下:The technical solution of the present invention is as follows:

一方面,本发明提供一种电能计量装置运行误差状态评价方法,包括以下步骤:In one aspect, the present invention provides a method for evaluating an operation error state of an electric energy metering device, comprising the following steps:

采集若干电能计量装置的历史运行监测数据,每一历史运行监测数据包括电能计量装置运行过程中产生的多个不同种类的物理量;Collecting historical operation monitoring data of a number of electric energy metering devices, each historical operation monitoring data includes a plurality of different types of physical quantities generated during the operation of the electric energy metering device;

对采集的每一历史运行监测数据进行特征提取,包括构造特征和特征选择两个步骤;Perform feature extraction on each collected historical operation monitoring data, including two steps: feature construction and feature selection;

其中,所述构造特征步骤具体为:对于每一历史运行监测数据,通过各种类的物理量计算得出对应各物理量的峭度排序能量特征、曲线复杂度特征和相间余弦相似度特征;The step of constructing features is specifically as follows: for each historical operation monitoring data, the kurtosis sorting energy feature, the curve complexity feature and the phase cosine similarity feature corresponding to each physical quantity are calculated by various types of physical quantities;

所述特征选择步骤具体为:对于任一历史运行监测数据,对构造特征步骤中获得的特征的集合进行筛选,得到最终特征集;The feature selection step specifically includes: for any historical operation monitoring data, screening the set of features obtained in the feature construction step to obtain a final feature set;

对每一历史运行监测数据的最终特征集添加误差状态标签,形成训练样本,构建神经网络模型,通过训练样本对所述神经网络模型进行迭代训练,得到训练好的电能计量装置运行误差状态评价模型;Add error state labels to the final feature set of each historical operation monitoring data to form training samples, build a neural network model, iteratively train the neural network model through the training samples, and obtain a trained electric energy metering device operation error state evaluation model;

获取目标电能计量装置的当前运行监测数据,根据当前运行监测数据进行特征提取获得目标电能计量装置当前的最终特征集,输入至训练好的电能计量装置运行误差状态评价模型得到目标电能计量装置的误差状态评价结果。The current operation monitoring data of the target electric energy metering device is obtained, and feature extraction is performed according to the current operation monitoring data to obtain the current final feature set of the target electric energy metering device, which is input into the trained electric energy metering device operation error state evaluation model to obtain the error state evaluation result of the target electric energy metering device.

作为优选实施方式,所述电能计量装置运行过程中产生的多个不同种类的物理量具体包括:As a preferred implementation, the multiple different types of physical quantities generated during the operation of the electric energy metering device specifically include:

电压数据、电流数据、有功功率数据、无功功率数据、功率因素数据、三相不平衡度数据以及负载率数据。Voltage data, current data, active power data, reactive power data, power factor data, three-phase imbalance data and load rate data.

作为优选实施方式,在所述通过各种类的物理量计算得出对应各物理量的峭度排序能量特征、曲线复杂度特征和相间余弦相似度特征步骤中,所述各物理量的峭度排序能量特征的计算方法为:As a preferred implementation, in the step of calculating the kurtosis sorting energy characteristics, curve complexity characteristics and inter-phase cosine similarity characteristics corresponding to each physical quantity through various types of physical quantities, the calculation method of the kurtosis sorting energy characteristics of each physical quantity is:

根据各种类的物理量绘制相应的物理量曲线,具体包括电流曲线、电压曲线、有功功率曲线、无功功率曲线、功率因素曲线、三相不平衡度曲线、负载率曲线;Draw corresponding physical quantity curves according to various types of physical quantities, including current curve, voltage curve, active power curve, reactive power curve, power factor curve, three-phase unbalance curve, and load rate curve;

对于各物理量曲线,通过峭度反映各物理量曲线随机变量分布特性的数值统计量,所述峭度K的表达式如下:For each physical quantity curve, the kurtosis reflects the numerical statistics of the random variable distribution characteristics of each physical quantity curve. The expression of the kurtosis K is as follows:

;

其中,N代表物理量曲线的信号长度;代表物理量曲线中第i个信号值;μ代表物理量曲线的信号平均值;σ代表物理量曲线的信号标准差;Where N represents the signal length of the physical quantity curve; represents the i-th signal value in the physical quantity curve; μ represents the signal average value of the physical quantity curve; σ represents the signal standard deviation of the physical quantity curve;

对于各物理量曲线中的各个信号,进行EMD经验模态分解,对分解后的信号计算峭度并根据计算出的峭度进行降序排序后,根据以下公式计算峭度排序能量E:For each signal in each physical quantity curve, perform EMD empirical mode decomposition, calculate the kurtosis of the decomposed signal and sort it in descending order according to the calculated kurtosis, and then calculate the kurtosis sorting energy E according to the following formula:

;

从而得到电流峭度排序能量特征、电压峭度排序能量特征、有功功率峭度排序能量特征、无功功率峭度排序能量特征、功率因素峭度排序能量特征、三相不平衡度峭度排序能量特征、负载率峭度排序能量特征。Thus, the current kurtosis sorting energy characteristics, voltage kurtosis sorting energy characteristics, active power kurtosis sorting energy characteristics, reactive power kurtosis sorting energy characteristics, power factor kurtosis sorting energy characteristics, three-phase imbalance kurtosis sorting energy characteristics, and load rate kurtosis sorting energy characteristics are obtained.

作为优选实施方式,在所述通过各种类的物理量计算得出对应各物理量的峭度排序能量特征、曲线复杂度特征和相间余弦相似度特征步骤中,所述各物理量的曲线复杂度特征的计算方法为:As a preferred implementation, in the step of calculating the kurtosis sorting energy characteristics, curve complexity characteristics and inter-phase cosine similarity characteristics corresponding to each physical quantity by various types of physical quantities, the calculation method of the curve complexity characteristics of each physical quantity is:

定义模糊熵为:Define fuzzy entropy as:

;

其中,m为相空间维数,r为相似容限度,N为时间序列的维度,为模糊隶属度函数;Among them, m is the dimension of phase space, r is the similarity tolerance, N is the dimension of time series, is the fuzzy membership function;

根据定义的模糊熵,分别计算曲线复杂度特征、第二电压曲线复杂度特征、第二有功功率曲线复杂度特征、第二无功功率曲线复杂度特征、第二功率因素曲线复杂度序特征、第二三相不平衡度曲线复杂度特征、第二负载率曲线复杂度特征分别为:According to the defined fuzzy entropy, the curve complexity characteristics are calculated respectively , the second voltage curve complexity characteristics , Complexity characteristics of the second active power curve , Complexity characteristics of the second reactive power curve , the second power factor curve complexity order characteristics 2. Complexity characteristics of the third-phase imbalance curve , Complexity characteristics of the second load rate curve They are:

;

;

;

;

;

;

其中,分别表示A相、B相、C相电流;分别为A相、B相、C相电压;分别表示A相、B相、C相和总的有功功率;分别表示A相、B相、C相和总的无功功率;分别表示A相、B相、C相和总的当前功率因素;为三相不平衡度数据;in, , , Respectively represent the A phase, B phase, and C phase currents; , , They are phase A, phase B, and phase C voltages respectively; , , , Respectively represent the active power of phase A, phase B, phase C and the total; , , , Respectively represent the reactive power of phase A, phase B, phase C and the total; , , , Respectively represent the current power factors of phase A, phase B, phase C and the total; It is the three-phase unbalance data;

R负载率表示负载率。R load factor indicates the load factor.

作为优选实施方式,在所述通过各种类的物理量计算得出对应各物理量的峭度排序能量特征、曲线复杂度特征和相间余弦相似度特征步骤中,所述各物理量的相间余弦相似度特征的计算方法为:As a preferred implementation, in the step of calculating the kurtosis sorting energy characteristics, curve complexity characteristics and interphase cosine similarity characteristics corresponding to each physical quantity by various types of physical quantities, the calculation method of the interphase cosine similarity characteristics of each physical quantity is:

根据余弦相似度公式,分别计算A相和B相电流余弦相似度特征、B相和C相电流余弦相似度特征、A相和C相电流余弦相似度特征、A相和B相电压余弦相似度特征、B相和C相电压余弦相似度特征、A相和C相电压余弦相似度特征、A相和B相有功功率余弦相似度特征、B相和C相有功功率余弦相似度特征、A相和C相有功功率余弦相似度特征、A相和B相无功功率余弦相似度特征、B相和C相无功功率余弦相似度特征、A相和C相无功功率余弦相似度特征、A相和B相功率因素余弦相似度特征、B相和C相功率因素余弦相似度特征、A相和C相功率因素余弦相似度特征According to the cosine similarity formula, the cosine similarity characteristics of phase A and phase B current are calculated respectively. , B-phase and C-phase current cosine similarity characteristics , A phase and C phase current cosine similarity characteristics , A-phase and B-phase voltage cosine similarity features , B-phase and C-phase voltage cosine similarity features , A phase and C phase voltage cosine similarity characteristics , A phase and B phase active power cosine similarity characteristics , B phase and C phase active power cosine similarity characteristics , A phase and C phase active power cosine similarity characteristics , A-phase and B-phase reactive power cosine similarity characteristics , B-phase and C-phase reactive power cosine similarity characteristics , A phase and C phase reactive power cosine similarity characteristics , A phase and B phase power factor cosine similarity characteristics , B phase and C phase power factor cosine similarity characteristics , A phase and C phase power factor cosine similarity characteristics ;

其中,余弦相似度公式为:Among them, the cosine similarity formula is:

;

其中,X,Y表示X、Y向量;分别表示X、Y向量的模。Where X, Y represent X and Y vectors; , Represents the magnitude of the X and Y vectors respectively.

作为优选实施方式,所述对构造特征步骤中获得的特征的集合进行筛选,得到最终特征集的方法具体为:As a preferred implementation, the method of screening the set of features obtained in the feature construction step to obtain the final feature set is specifically:

以各物理量的峭度排序能量特征作为第一特征集,各物理量的曲线复杂度特征作为第二特征集,各物理量的相间余弦相似度特征作为第三特征集,将第一特征集、第二特征集和第三特征集合并为第四特征集;The kurtosis sorting energy features of each physical quantity are used as the first feature set, the curve complexity features of each physical quantity are used as the second feature set, the inter-phase cosine similarity features of each physical quantity are used as the third feature set, and the first feature set, the second feature set and the third feature set are combined into a fourth feature set;

使用第一特征选择算法、第二特征选择算法、……第n特征选择算法分别对第四特征集进行特征选择,得到n个特征子集;Use the first feature selection algorithm, the second feature selection algorithm, ... the nth feature selection algorithm to perform feature selection on the fourth feature set respectively to obtain n feature subsets;

将n个特征子集合并为第五特征集;Merge n feature subsets into the fifth feature set;

使用第n+1特征选择算法对第五特征集进行特征选择,得到第六特征集,以第六特征集作为最终特征集;Use the n+1th feature selection algorithm to perform feature selection on the fifth feature set to obtain a sixth feature set, and use the sixth feature set as the final feature set;

其中,所述第一特征选择算法、第二特征选择算法、……第n特征选择算法和第n+1特征选择算法具体从方差选择法、相关系数法、卡方检验法、relief算法、递归特征消除法、基于惩罚项的特征选择法以及基于树模型的特征选择法中选取。Among them, the first feature selection algorithm, the second feature selection algorithm, ... the nth feature selection algorithm and the n+1th feature selection algorithm are specifically selected from variance selection method, correlation coefficient method, chi-square test method, relief algorithm, recursive feature elimination method, penalty-based feature selection method and tree model-based feature selection method.

作为优选实施方式,所述神经网络模型采用非线性时序预测NARX神经网络模型,并采用金鹰算法对该神经网络模型进行优化,具体步骤为:As a preferred implementation, the neural network model adopts a nonlinear time series prediction NARX neural network model, and the Golden Eagle algorithm is used to optimize the neural network model. The specific steps are:

初始化金鹰种群中金鹰个体的数量,每个金鹰包含不同的NARX神经网络模型的的权重系数信息和阈值参数信息;Initialize the number of golden eagle individuals in the golden eagle population. Each golden eagle contains different weight coefficient information and threshold parameter information of the NARX neural network model.

计算金鹰个体的适应度值并根据适应度值初始化群体记忆;其中, 金鹰个体的适应度值计算公式为:Calculate the fitness value of the golden eagle individual and initialize the group memory according to the fitness value; the fitness value calculation formula of the golden eagle individual is:

;

其中,value表示适应度值,N为金鹰个体的总数,为根据第i个金鹰包含的NARX神经网络模型的的权重系数信息和阈值参数信息得到的NARX神经网络模型的预测值,为第i个金鹰所对应的样本真实值;Among them, value represents the fitness value, N is the total number of golden eagle individuals, is the predicted value of the NARX neural network model obtained according to the weight coefficient information and threshold parameter information of the NARX neural network model contained in the i-th Golden Eagle, is the true value of the sample corresponding to the i-th golden eagle;

初始化金鹰的攻击倾向和巡航倾向Initialize the Golden Eagle's attack tendency and cruising tendency ;

根据以下公式更新攻击倾向和巡航倾向Update the attack tendency according to the following formula and cruising tendency :

;

其中,的初始值和最终值,的初始值和最终值;t为第t次迭代,T为总的迭代次数。in, and for The initial and final values of and for The initial and final values of ; t is the tth iteration, and T is the total number of iterations.

从种群的记忆计算的攻击向量中随机选择猎物:Prey is randomly selected from the attack vector calculated from the memory of the population:

;

其中,为第i只金鹰的攻击向量,为当前金鹰所到达的最佳地点,是第i只金鹰目前的位置;in, is the attack vector of the i-th golden eagle, This is the best place for the Golden Eagle to reach at present. is the current position of the i-th golden eagle;

计算巡航向量d:Calculate the cruise vector d:

;

其中,为法向量,为决策变量向量;in, is the normal vector, is the decision variable vector;

为超平面上的任一点,则:set up is any point on the hyperplane, then: ;

看做超平面的法线,则超平面表示为:Bundle As the normal of the hyperplane, the hyperplane is expressed as:

;

其中,为攻击向量,为决策向量,为被选中的猎物位置;表示第t次迭代时的攻击向量; in, is the attack vector, is the decision vector, The location of the selected prey; represents the attack vector at the tth iteration;

则:but:

;

其中,为目标点的第k个元素,k为固定变量的编号;in, is the kth element of the target point, k is the number of the fixed variable;

巡航超平面上目的点表示为:The destination point on the cruise hyperplane is expressed as:

金鹰迭代的步长向量定义为:The step vector of the Golden Eagle iteration is defined as:

;

其中,为[0,1]内的随机向量,通过将迭代中的步长向量加到迭代中的位置,计算出金鹰在迭代中的位置:in, and is a random vector in [0,1]. The position of the golden eagle in the iteration is calculated by adding the step vector in the iteration to the position in the iteration:

其中,为金鹰的第次位置,为金鹰的第次的位置,为金鹰 的异动的步长大小; in, For the Golden Eagle Second position, For the Golden Eagle The second position, is the step size of the Golden Eagle's movement;

根据更新的新的金鹰个体的位置计算适应度值,更新最优解及最优位置;Calculate the fitness value according to the updated position of the new golden eagle individual, and update the optimal solution and optimal position;

判断是否达到最大迭代次数,达到最大迭代次数则输出当前最优位置上金鹰个体所包含的权重系数信息和阈值参数信息作为NARX神经网络模型的权重系数和阈值参数;未达到最大迭代次数则继续迭代。Determine whether the maximum number of iterations has been reached. If the maximum number of iterations has been reached, the weight coefficient information and threshold parameter information contained in the golden eagle individual at the current optimal position are output as the weight coefficient and threshold parameter of the NARX neural network model; if the maximum number of iterations has not been reached, continue to iterate.

另一方面,本发明还提供一种电能计量装置运行误差状态评价系统,包括:On the other hand, the present invention also provides an electric energy metering device operation error state evaluation system, comprising:

采集模块,用于采集若干电能计量装置的历史运行监测数据,每一历史运行监测数据包括电能计量装置运行过程中产生的多个不同种类的物理量;A collection module, used to collect historical operation monitoring data of a number of electric energy metering devices, each historical operation monitoring data includes a plurality of different types of physical quantities generated during the operation of the electric energy metering device;

特征提取模块,用于对采集的每一历史运行监测数据进行特征提取,包括构造特征和特征选择两个步骤;The feature extraction module is used to extract features from each collected historical operation monitoring data, including two steps: feature construction and feature selection;

其中,所述构造特征步骤具体为:对于每一历史运行监测数据,通过各种类的物理量计算得出对应各物理量的峭度排序能量特征、曲线复杂度特征和相间余弦相似度特征;The step of constructing features is specifically as follows: for each historical operation monitoring data, the kurtosis sorting energy feature, the curve complexity feature and the phase cosine similarity feature corresponding to each physical quantity are calculated by various types of physical quantities;

所述特征选择步骤具体为:对于任一历史运行监测数据,对构造特征步骤中获得的特征的集合进行筛选,得到最终特征集;The feature selection step specifically includes: for any historical operation monitoring data, screening the set of features obtained in the feature construction step to obtain a final feature set;

模型训练模块,用于对每一历史运行监测数据的最终特征集添加误差状态标签,形成训练样本,构建神经网络模型,通过训练样本对所述神经网络模型进行迭代训练,得到训练好的电能计量装置运行误差状态评价模型;A model training module is used to add an error state label to the final feature set of each historical operation monitoring data to form a training sample, construct a neural network model, and iteratively train the neural network model through the training sample to obtain a trained electric energy metering device operation error state evaluation model;

评价模块,用于获取目标电能计量装置的当前运行监测数据,根据当前运行监测数据进行特征提取获得目标电能计量装置当前的最终特征集,输入至训练好的电能计量装置运行误差状态评价模型得到目标电能计量装置的误差状态评价结果。The evaluation module is used to obtain the current operation monitoring data of the target electric energy metering device, perform feature extraction based on the current operation monitoring data to obtain the current final feature set of the target electric energy metering device, and input it into the trained electric energy metering device operation error state evaluation model to obtain the error state evaluation result of the target electric energy metering device.

再一方面,本发明还提供一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如本发明任一实施例所述的电能计量装置运行误差状态评价方法。On the other hand, the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for evaluating the operating error state of an electric energy metering device as described in any embodiment of the present invention is implemented.

再一方面,本发明还提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本发明任一实施例所述的电能计量装置运行误差状态评价方法。On the other hand, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for evaluating the operating error state of an electric energy metering device as described in any embodiment of the present invention.

本发明具有如下有益效果:The present invention has the following beneficial effects:

1、本发明一种电能计量装置运行误差状态评价方法、系统、设备及介质,通过采集电能计量装置运行过程中产生的多个不同种类的物理量作为原始数据,保证监测数据的客观可靠,再对监测数据进行特征构造和选择,降低特征数据的维度,再利用选择出的特征数据训练得到电能计量装置运行误差状态评价模型,使得能够根据客观的监测数据进行电能计量装置运行误差状态的评价。1. The present invention provides an electric energy metering device operating error state evaluation method, system, equipment and medium, which collects multiple different types of physical quantities generated during the operation of the electric energy metering device as original data to ensure the objectivity and reliability of monitoring data, then constructs and selects features for the monitoring data to reduce the dimension of the feature data, and then uses the selected feature data to train an electric energy metering device operating error state evaluation model, so that the electric energy metering device operating error state can be evaluated based on objective monitoring data.

2、本发明一种电能计量装置运行误差状态评价方法、系统、设备及介质,通过各个种类的物理量计算得出峭度排序能量特征、曲线复杂度特征和相间余弦相似度特征作为特征数据,能够很好的反映采集的监测数据的分布特性。2. The present invention provides an electric energy metering device operating error state evaluation method, system, equipment and medium, which calculate various types of physical quantities to obtain kurtosis sorting energy characteristics, curve complexity characteristics and phase cosine similarity characteristics as feature data, which can well reflect the distribution characteristics of the collected monitoring data.

3、本发明一种电能计量装置运行误差状态评价方法、系统、设备及介质,提出通过金鹰算法对NARX神经网络模型进行优化,能够限制网络的整体参数规模,最终提高NARX神经网络的泛化性能,最终提高误差状态评价的准确性。3. The present invention provides a method, system, equipment and medium for evaluating the operating error state of an electric energy metering device, and proposes to optimize the NARX neural network model through the Golden Eagle algorithm, which can limit the overall parameter scale of the network, ultimately improve the generalization performance of the NARX neural network, and ultimately improve the accuracy of the error state evaluation.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为本发明实例一的方法流程图;FIG1 is a flow chart of a method of Example 1 of the present invention;

图2为本发明实施例进行特征选择的流程示例图;FIG2 is a flowchart illustrating a feature selection process according to an embodiment of the present invention;

图3为本发明实施例中NARX神经网络模型的网络结构示例图。FIG3 is a diagram showing an example of a network structure of a NARX neural network model according to an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

应当理解,文中所使用的步骤编号仅是为了方便描述,不对作为对步骤执行先后顺序的限定。It should be understood that the step numbers used in this document are only for convenience of description and are not intended to limit the order in which the steps are executed.

应当理解,在本发明说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本发明。如在本发明说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and/or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and/or combinations thereof.

术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。The term "and/or" means and includes any and all possible combinations of one or more of the associated listed items.

实施例一:Embodiment 1:

参见图1,本实施例提供一种电能计量装置运行误差状态评价方法,包括以下步骤:Referring to FIG. 1 , this embodiment provides a method for evaluating an operation error state of an electric energy metering device, comprising the following steps:

S100、采集若干电能计量装置的历史运行监测数据,每一历史运行监测数据包括电能计量装置运行过程中产生的多个不同种类的物理量。具体地,电能计量装置包括电压互感器、电流互感器及相应的二次回路、电能表,而典型的故障包括失压、失流和压降超差等电能表故障。电能计量装置的运行监测数据主要包括电压、电流和分相功率等十余个物理量。S100. Collect historical operation monitoring data of several electric energy metering devices, each of which includes multiple different types of physical quantities generated during the operation of the electric energy metering device. Specifically, the electric energy metering device includes a voltage transformer, a current transformer and the corresponding secondary circuit, and an electric energy meter, and typical faults include electric energy meter faults such as loss of pressure, loss of current, and voltage drop tolerance. The operation monitoring data of the electric energy metering device mainly includes more than ten physical quantities such as voltage, current, and phase power.

作为本实施例的优选实施方式,本实施例采集的电能计量装置运行过程中产生的多个不同种类的物理量具体包括:As a preferred implementation of this embodiment, the multiple different types of physical quantities generated during the operation of the electric energy metering device collected in this embodiment specifically include:

电压数据、电流数据、有功功率数据、无功功率数据、功率因素数据、三相不平衡度数据以及负载率数据,即历史运行监测数据为:Voltage data, current data, active power data, reactive power data, power factor data, three-phase unbalance data and load rate data, i.e. historical operation monitoring data for:

其中,为三相电流数据,为三相电压数据,为有功功率数据,为无功功率数据,为功率因素数据,为三相不平衡度数据,为负载率数据,进一步地:in, is the three-phase current data, is the three-phase voltage data, is the active power data, is the reactive power data, is the power factor data, is the three-phase unbalance data, For load factor data, further:

;

;

;

;

;

其中,分别表示A相、B相、C相电流;分别表示A相、B相、C相电压;分别表示A相、B相、C相和总的有功功率;分别表示A相、B相、C相和总的无功功率;分别表示A相、B相、C相和总的功率因素。in, , , Respectively represent the A phase, B phase, and C phase currents; , , Respectively represent the voltage of phase A, phase B, and phase C; , , , Respectively represent the active power of phase A, phase B, phase C and the total; , , , Respectively represent the reactive power of phase A, phase B, phase C and the total; , , , Represents the power factors of phase A, phase B, phase C and the total respectively.

S200、对采集的每一历史运行监测数据进行特征提取,包括进行构造特征的步骤S210和进行特征选择的步骤S220两个步骤;S200, extracting features from each collected historical operation monitoring data, including two steps of constructing features S210 and selecting features S220;

其中,S210具体为:Among them, S210 is specifically:

对于采集到的每一历史运行监测数据,通过各种类的物理量(即上述电压数据、电流数据、有功功率数据、无功功率数据、功率因素数据、三相不平衡度数据以及负载率数据)计算得出对应各物理量的峭度排序能量特征、曲线复杂度特征和相间余弦相似度特征。具体步骤如下:For each historical operation monitoring data collected , through various types of physical quantities (i.e. the above voltage data, current data, active power data, reactive power data, power factor data, three-phase imbalance data and load rate data), the kurtosis sorting energy characteristics, curve complexity characteristics and phase cosine similarity characteristics of each physical quantity are calculated. The specific steps are as follows:

S211、构造第一特征集(峭度排序能量特征):根据历史运行监测数据绘制电流曲线、电压曲线、有功功率曲线、无功功率曲线、功率因素曲线、三相不平衡度曲线、负载率曲线;S211, construct the first feature set (kurtosis sorting energy feature): based on historical operation monitoring data Draw current curve, voltage curve, active power curve, reactive power curve, power factor curve, three-phase unbalance curve, load rate curve;

对于各物理量曲线,通过峭度反映各物理量曲线随机变量分布特性的数值统计量,峭度是反映随机变量分布特性的数值统计量 ,是归一化4阶中心矩,所述峭度K的表达式如下:For each physical quantity curve, the kurtosis is used to reflect the numerical statistics of the random variable distribution characteristics of each physical quantity curve. The kurtosis is a numerical statistic that reflects the distribution characteristics of the random variable. It is the normalized fourth-order central moment. The expression of the kurtosis K is as follows:

;

其中,N代表物理量曲线的信号长度;代表物理量曲线中第i个信号值;μ代表物理量曲线的信号平均值;σ代表物理量曲线的信号标准差;Where N represents the signal length of the physical quantity curve; represents the i-th signal value in the physical quantity curve; μ represents the signal average value of the physical quantity curve; σ represents the signal standard deviation of the physical quantity curve;

当电能计量装置处于不同工况时,信号分解之后各IMF(intrinsic modefunctions,固有模态函数)信号的峭度值存在较大差异。对于各物理量曲线中的各个信号,进行EMD经验模态分解,对分解后的信号计算峭度并根据计算出的峭度进行降序排序后,根据以下公式计算峭度排序能量E:When the electric energy metering device is in different working conditions, the kurtosis values of each IMF (intrinsic mode functions) signal after signal decomposition are quite different. For each signal in each physical quantity curve, EMD empirical mode decomposition is performed, the kurtosis of the decomposed signal is calculated and sorted in descending order according to the calculated kurtosis, and the kurtosis sorting energy E is calculated according to the following formula:

;

从而得到包括电流峭度排序能量特征、电压峭度排序能量特征、有功功率峭度排序能量特征、无功功率峭度排序能量特征、功率因素峭度排序能量特征、三相不平衡度峭度排序能量特征、负载率峭度排序能量特征的第一特征集。Thus, a first feature set is obtained, including current kurtosis sorting energy characteristics, voltage kurtosis sorting energy characteristics, active power kurtosis sorting energy characteristics, reactive power kurtosis sorting energy characteristics, power factor kurtosis sorting energy characteristics, three-phase imbalance kurtosis sorting energy characteristics, and load rate kurtosis sorting energy characteristics.

S212、构造第二特征集(曲线复杂度特征):根据模糊熵的定义,分别计算电流曲线复杂度特征、电压曲线复杂度特征、有功功率曲线复杂度特征、无功功率曲线复杂度特征、功率因素曲线复杂度序特征、三相不平衡度曲线复杂度特征、负载率曲线复杂度特征;S212, constructing a second feature set (curve complexity feature): according to the definition of fuzzy entropy, respectively calculating the current curve complexity feature, voltage curve complexity feature, active power curve complexity feature, reactive power curve complexity feature, power factor curve complexity sequence feature, three-phase unbalance curve complexity feature, and load rate curve complexity feature;

模糊熵(FuzzyEn)衡量的也是新模式产生的概率大小,测度值越大,新模式产生的概率越大,即序列复杂度越大。模糊熵描述如下:Fuzzy entropy (FuzzyEn) also measures the probability of a new pattern. The larger the measurement value, the greater the probability of a new pattern, that is, the greater the sequence complexity. Fuzzy entropy is described as follows:

;

其中,m为相空间维数,r为相似容限度,N为时间序列的维度,为模糊隶属度函数;Among them, m is the dimension of phase space, r is the similarity tolerance, N is the dimension of time series, is the fuzzy membership function;

根据定义的模糊熵,分别计算曲线复杂度特征、第二电压曲线复杂度特征、第二有功功率曲线复杂度特征、第二无功功率曲线复杂度特征、第二功率因素曲线复杂度序特征、第二三相不平衡度曲线复杂度特征、第二负载率曲线复杂度特征分别为:According to the defined fuzzy entropy, the curve complexity characteristics are calculated respectively , the second voltage curve complexity characteristics , Complexity characteristics of the second active power curve , Complexity characteristics of the second reactive power curve , the second power factor curve complexity order characteristics 2. Complexity characteristics of the third-phase imbalance curve , Complexity characteristics of the second load rate curve They are:

;

;

;

;

;

;

.

S213、构造第三特征集(相间余弦相似度特征):根据余弦相似度公式,分别计算A相和B相电流余弦相似度特征、B相和C相电流余弦相似度特征、A相和C相电流余弦相似度特征、A相和B相电压余弦相似度特征、B相和C相电压余弦相似度特征、A相和C相电压余弦相似度特征、A相和B相有功功率余弦相似度特征、B相和C相有功功率余弦相似度特征、A相和C相有功功率余弦相似度特征、A相和B相无功功率余弦相似度特征、B相和C相无功功率余弦相似度特征、A相和C相无功功率余弦相似度特征、A相和B相功率因素余弦相似度特征、B相和C相功率因素余弦相似度特征、A相和C相功率因素余弦相似度特征S213, construct the third feature set (phase-to-phase cosine similarity feature): according to the cosine similarity formula, calculate the cosine similarity features of phase A and phase B currents respectively. , B-phase and C-phase current cosine similarity characteristics , A phase and C phase current cosine similarity characteristics , A-phase and B-phase voltage cosine similarity features , B-phase and C-phase voltage cosine similarity features , A phase and C phase voltage cosine similarity characteristics , A phase and B phase active power cosine similarity characteristics , B phase and C phase active power cosine similarity characteristics , A phase and C phase active power cosine similarity characteristics , A-phase and B-phase reactive power cosine similarity characteristics , B-phase and C-phase reactive power cosine similarity characteristics , A phase and C phase reactive power cosine similarity characteristics , A phase and B phase power factor cosine similarity characteristics , B phase and C phase power factor cosine similarity characteristics , A phase and C phase power factor cosine similarity characteristics ;

其中,余弦相似度公式为:Among them, the cosine similarity formula is:

;

其中,X,Y表示X、Y向量;分别表示X、Y向量的模;Where X, Y represent X and Y vectors; , Represents the magnitude of X and Y vectors respectively;

故求得各特征为:Therefore, the characteristics are obtained as follows:

.

S220步骤具体为:对于任一历史运行监测数据,对步骤S201构造的电压数据、电流数据、有功功率数据、无功功率数据、功率因素数据、三相不平衡度数据以及负载率数据的峭度排序能量特征、曲线复杂度特征和相间余弦相似度特征集合进行选择/筛选,得到最终特征集;具体参见图2,步骤S220具体包括:Step S220 is specifically as follows: for any historical operation monitoring data , the kurtosis sorting energy features, curve complexity features and inter-phase cosine similarity feature sets of the voltage data, current data, active power data, reactive power data, power factor data, three-phase unbalance data and load rate data constructed in step S201 are selected/screened to obtain a final feature set; specifically referring to FIG. 2 , step S220 specifically includes:

S221、以各物理量的峭度排序能量特征作为第一特征集,各物理量的曲线复杂度特征作为第二特征集,各物理量的相间余弦相似度特征作为第三特征集,将第一特征集、第二特征集和第三特征集合并为第四特征集;S221, taking the kurtosis sorting energy features of each physical quantity as the first feature set, the curve complexity features of each physical quantity as the second feature set, and the inter-phase cosine similarity features of each physical quantity as the third feature set, and merging the first feature set, the second feature set and the third feature set into a fourth feature set;

S222、使用第一特征选择算法、第二特征选择算法、……第n特征选择算法分别对第四特征集进行特征选择,得到n个特征子集;S222, using the first feature selection algorithm, the second feature selection algorithm, ... the nth feature selection algorithm to perform feature selection on the fourth feature set respectively, to obtain n feature subsets;

S223、将n个特征子集汇聚成一个交集,得到第五特征集;S223, aggregating the n feature subsets into an intersection to obtain a fifth feature set;

S224、使用第n+1特征选择算法对第五特征集进行特征选择,得到第六特征集,以第六特征集作为最终特征集;S224, performing feature selection on the fifth feature set using the n+1th feature selection algorithm to obtain a sixth feature set, and using the sixth feature set as the final feature set;

其中,所述第一特征选择算法、第二特征选择算法、……第n特征选择算法和第n+1特征选择算法具体从方差选择法、相关系数法、卡方检验法、relief算法、递归特征消除法、基于惩罚项的特征选择法以及基于树模型的特征选择法等特征选择方法中选取。Among them, the first feature selection algorithm, the second feature selection algorithm, ... the nth feature selection algorithm and the n+1th feature selection algorithm are specifically selected from feature selection methods such as variance selection method, correlation coefficient method, chi-square test method, relief algorithm, recursive feature elimination method, penalty-based feature selection method and tree model-based feature selection method.

S300、对每一历史运行监测数据的最终特征集添加误差状态标签,形成训练样本,构建非线性时序预测(Nonlinear Autoregressive models with Exogenous Inputs,NARX)神经网络模型,通过训练样本对所述NARX神经网络模型进行迭代训练,得到训练好的电能计量装置运行误差状态评价模型;S300, adding an error state label to the final feature set of each historical operation monitoring data to form a training sample, constructing a nonlinear time series prediction (Nonlinear Autoregressive models with Exogenous Inputs, NARX) neural network model, iteratively training the NARX neural network model through the training sample, and obtaining a trained electric energy metering device operation error state evaluation model;

具体参见图3,图3为 NARX神经网络的参考结构示意图,NARX神经网络是基于BP神经网络的一种结构清晰的动态神经网络,其在BP神经网络的基础上将输出向量的一部分数据进行保存之后,以外部反馈的方式引入到输入向量之中。Specifically refer to Figure 3, which is a schematic diagram of the reference structure of the NARX neural network. The NARX neural network is a dynamic neural network with a clear structure based on the BP neural network. On the basis of the BP neural network, it saves part of the output vector data and introduces it into the input vector in the form of external feedback.

参见图3,假设的当前时刻为t,nx为神经网络输入的阶数,ny为神经网络的输出阶数,表示神经网络的第 i 个输入向量到第 j 个隐藏层神经元之间的权值,表示神经网络的第i个隐藏层神经元到第j个输出层神经元之间的权值,为神经网络隐藏层第 n 个神经元的偏移值,为神经网络输出层神经元的偏移值,X(t) 为输入向量,Y(t)为反馈输出的输入向量,表示神经网络隐藏层的传输函数,多使用Tan-sigmoid函数,表示第 n 个隐藏层的神经元输出值,表示神经网络输出神经元的传输函数。Referring to FIG3 , it is assumed that the current time is t, nx is the order of the neural network input, ny is the order of the neural network output, represents the weight between the i-th input vector and the j-th hidden layer neuron of the neural network, Represents the weight between the i-th hidden layer neuron and the j-th output layer neuron of the neural network, is the offset value of the nth neuron in the hidden layer of the neural network, is the offset value of the neuron in the output layer of the neural network, X(t) is the input vector, Y(t) is the input vector of the feedback output, Represents the transfer function of the hidden layer of the neural network, mostly using the Tan-sigmoid function, represents the neuron output value of the nth hidden layer, Represents the transfer function of the output neuron of a neural network.

采用单纯的均方误差性能函数调整NARX神经网络模型的结构参数,其效用相当于使NARX神经网络模型在训练集数据上获得最优的拟合效果,从而引入“过拟合”的问题。“过拟合”问题表现为训练完成的NARX神经网络模型泛化能力不强,即只在训练集中表现出良好的性能,而应用于实际的测试集时预测效果较差。在训练集固定的情况下,神经网络的泛化能力与其网络参数规模联系紧密。为此,本实施例引入了金鹰算法旨在通过优化NARX神经网络中的权重系数、阈值参数,限制网络的整体参数规模,最终提高NARX神经网络的泛化性能。The structural parameters of the NARX neural network model are adjusted by using a simple mean square error performance function, which is equivalent to making the NARX neural network model obtain the best fitting effect on the training set data, thereby introducing the problem of "overfitting". The "overfitting" problem is manifested in that the trained NARX neural network model has a weak generalization ability, that is, it only shows good performance in the training set, but the prediction effect is poor when applied to the actual test set. When the training set is fixed, the generalization ability of the neural network is closely related to the scale of its network parameters. For this reason, this embodiment introduces the Golden Eagle algorithm, which aims to limit the overall parameter scale of the network by optimizing the weight coefficients and threshold parameters in the NARX neural network, and ultimately improve the generalization performance of the NARX neural network.

金鹰算法是金鹰在其螺旋轨迹的不同阶段调谐速度的智能,用于狩猎。它们在狩猎的初始阶段表现出更多的巡游和寻找猎物的倾向,在最后阶段表现出更多的攻击倾向。一只金鹰调整这两个组件,以在可行的区域以最短的时间捕获最好的猎物。具体步骤如下:The Golden Eagle Algorithm is the intelligence of the Golden Eagle to tune its speed at different stages of its spiral trajectory for hunting. They show more tendencies to wander and search for prey in the initial stages of hunting, and more tendencies to attack in the final stages. A Golden Eagle adjusts these two components to capture the best prey in the shortest time in a feasible area. The specific steps are as follows:

S311、初始化金鹰种群中金鹰个体的数量,每个金鹰包含不同的NARX神经网络模型的的权重系数信息和阈值参数信息;S311, initializing the number of golden eagle individuals in the golden eagle population, each golden eagle containing different weight coefficient information and threshold parameter information of the NARX neural network model;

S312、计算金鹰个体的适应度值并根据适应度值初始化群体记忆;其中, 金鹰个体的适应度值计算公式为:S312, calculate the fitness value of the golden eagle individual and initialize the group memory according to the fitness value; wherein, the fitness value calculation formula of the golden eagle individual is:

;

其中,value表示适应度值,N为金鹰个体的总数,为根据第i个金鹰包含的NARX神经网络模型的的权重系数信息和阈值参数信息得到的NARX神经网络模型的预测值,为第i个金鹰所对应的样本真实值;Among them, value represents the fitness value, N is the total number of golden eagle individuals, is the predicted value of the NARX neural network model obtained according to the weight coefficient information and threshold parameter information of the NARX neural network model contained in the i-th Golden Eagle, is the true value of the sample corresponding to the i-th golden eagle;

S313、初始化金鹰的攻击倾向和巡航倾向S313, Initialize the attack tendency of the Golden Eagle and cruising tendency ;

S314、根据以下公式更新攻击倾向和巡航倾向S314, update the attack tendency according to the following formula and cruising tendency :

;

其中,的初始值和最终值,的初始值和最终值;t为第t次迭代,T为总的迭代次数;in, and for The initial and final values of and for The initial and final values of ; t is the tth iteration, and T is the total number of iterations;

S315、从种群的记忆计算的攻击向量中随机选择猎物:S315. Randomly select prey from the attack vector calculated by the memory of the population:

;

其中,为第i只金鹰的攻击向量,为当前金鹰所到达的最佳地点,是第i只金鹰目前的位置;in, is the attack vector of the i-th golden eagle, This is the best place for the Golden Eagle to reach at present. is the current position of the i-th golden eagle;

S316、计算巡航向量d:S316, calculate the cruise vector d:

;

其中,为法向量,为决策变量向量;in, is the normal vector, is the decision variable vector;

为超平面上的任一点,则:set up is any point on the hyperplane, then: ;

看做超平面的法线,则超平面表示为:Bundle As the normal of the hyperplane, the hyperplane is expressed as:

;

其中,为攻击向量,为决策向量,为被选中的猎物位置;表示第t次迭代时的攻击向量; in, is the attack vector, is the decision vector, The location of the selected prey; represents the attack vector at the tth iteration;

则:but:

;

其中,为目标点的第k个元素,k为固定变量的编号;in, is the kth element of the target point, k is the number of the fixed variable;

巡航超平面上目的点表示为:The destination point on the cruise hyperplane is expressed as:

金鹰迭代的步长向量定义为:The step vector of the Golden Eagle iteration is defined as:

;

其中,为[0,1]内的随机向量,通过将迭代中的步长向量加到迭代中的位置,计算出金鹰在迭代中的位置:in, and is a random vector in [0,1]. The position of the golden eagle in the iteration is calculated by adding the step vector in the iteration to the position in the iteration:

其中,为金鹰的第次位置,为金鹰的第次的位置,为金鹰 的异动的步长大小; in, For the Golden Eagle Second position, For the Golden Eagle The second position, is the step size of the Golden Eagle's movement;

S317、根据更新的新的金鹰个体的位置计算适应度值,更新最优解及最优位置;S317, calculating the fitness value according to the updated position of the new golden eagle individual, and updating the optimal solution and the optimal position;

S318、判断是否达到最大迭代次数,达到最大迭代次数则输出当前最优位置上金鹰个体所包含的权重系数信息和阈值参数信息作为NARX神经网络模型的权重系数和阈值参数;未达到最大迭代次数则返回步骤S314并继续迭代。S318. Determine whether the maximum number of iterations has been reached. If the maximum number of iterations has been reached, output the weight coefficient information and threshold parameter information contained in the golden eagle individual at the current optimal position as the weight coefficient and threshold parameter of the NARX neural network model; if the maximum number of iterations has not been reached, return to step S314 and continue iterating.

基于本实施例提供的神经网络优化方法,金鹰算法迭代寻优过程就是NARX神经网络训练过程中权值参数、阈值参数的更新过程,其中适应度对应NARX神经网络误差函数(value),通过改变金鹰的位置使误差达到最小。每个金鹰包含NARX神经网络中的权重系数信息、阈值参数信息,当金鹰到最优位置时,此时金鹰个体所含的权重系数信息、阈值参数信息为更新的最优参数。Based on the neural network optimization method provided in this embodiment, the iterative optimization process of the Golden Eagle algorithm is the update process of the weight parameters and threshold parameters in the NARX neural network training process, where the fitness corresponds to the NARX neural network error function (value), and the error is minimized by changing the position of the Golden Eagle. Each Golden Eagle contains the weight coefficient information and threshold parameter information in the NARX neural network. When the Golden Eagle reaches the optimal position, the weight coefficient information and threshold parameter information contained in the Golden Eagle individual are the updated optimal parameters.

S400、获取目标电能计量装置的当前运行监测数据,根据当前运行监测数据进行特征提取获得目标电能计量装置当前的最终特征集,输入至训练好的电能计量装置运行误差状态评价模型得到目标电能计量装置的误差状态评价结果。S400, obtaining current operation monitoring data of the target electric energy metering device, performing feature extraction based on the current operation monitoring data to obtain the current final feature set of the target electric energy metering device, and inputting the feature set into a trained electric energy metering device operation error state evaluation model to obtain an error state evaluation result of the target electric energy metering device.

实施例二:Embodiment 2:

本实施例提供一种电能计量装置运行误差状态评价系统,包括:This embodiment provides an electric energy metering device operation error state evaluation system, including:

采集模块,用于采集若干电能计量装置的历史运行监测数据,每一历史运行监测数据包括电能计量装置运行过程中产生的多个不同种类的物理量;该模块用于实现实施例一中步骤S100的功能,在此不再赘述;A collection module, used to collect historical operation monitoring data of several electric energy metering devices, each of which includes multiple different types of physical quantities generated during the operation of the electric energy metering device; this module is used to implement the function of step S100 in the first embodiment, which will not be described in detail here;

特征提取模块,用于对采集的每一历史运行监测数据进行特征提取,包括构造特征和特征选择两个步骤;该模块用于实现实施例一中步骤S200的功能;A feature extraction module, used to extract features from each collected historical operation monitoring data, including two steps of constructing features and selecting features; this module is used to implement the function of step S200 in the first embodiment;

其中,所述构造特征步骤具体为:对于每一历史运行监测数据,通过各种类的物理量计算得出对应各物理量的峭度排序能量特征、曲线复杂度特征和相间余弦相似度特征;The step of constructing features is specifically as follows: for each historical operation monitoring data, the kurtosis sorting energy feature, the curve complexity feature and the phase cosine similarity feature corresponding to each physical quantity are calculated by various types of physical quantities;

所述特征选择步骤具体为:对于任一历史运行监测数据,对构造特征步骤中获得的特征的集合进行筛选,得到最终特征集;The feature selection step specifically includes: for any historical operation monitoring data, screening the set of features obtained in the feature construction step to obtain a final feature set;

模型训练模块,用于对每一历史运行监测数据的最终特征集添加误差状态标签,形成训练样本,构建神经网络模型,通过训练样本对所述神经网络模型进行迭代训练,得到训练好的电能计量装置运行误差状态评价模型;该模块用于实现实施例一中步骤S300的功能;A model training module, used to add an error state label to the final feature set of each historical operation monitoring data to form a training sample, construct a neural network model, iteratively train the neural network model through the training sample, and obtain a trained electric energy metering device operation error state evaluation model; this module is used to implement the function of step S300 in the first embodiment;

评价模块,用于获取目标电能计量装置的当前运行监测数据,根据当前运行监测数据进行特征提取获得目标电能计量装置当前的最终特征集,输入至训练好的电能计量装置运行误差状态评价模型得到目标电能计量装置的误差状态评价结果;该模块用于实现实施例一中步骤S400的功能。An evaluation module is used to obtain the current operation monitoring data of the target electric energy metering device, perform feature extraction based on the current operation monitoring data to obtain the current final feature set of the target electric energy metering device, and input it into the trained electric energy metering device operation error state evaluation model to obtain the error state evaluation result of the target electric energy metering device; this module is used to implement the function of step S400 in Example 1.

实施例三:Embodiment three:

本实施例提出一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如本发明任一实施例所述的电能计量装置运行误差状态评价方法。This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for evaluating the operating error state of an electric energy metering device as described in any embodiment of the present invention is implemented.

实施例四:Embodiment 4:

本实施例提出一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本发明任一实施例所述的电能计量装置运行误差状态评价方法。This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for evaluating the operating error state of an electric energy metering device as described in any embodiment of the present invention is implemented.

本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b和c中的至少一项可以表示:a,b,c,a和b,a和c,b和c或a和b和c,其中a,b,c可以是单个,也可以是多个。In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And/or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and/or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character "/" generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.

本领域普通技术人员可以意识到,本文中公开的实施例中描述的各单元及算法步骤,能够以电子硬件、计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

在本申请所提供的几个实施例中,任一功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory;以下简称:ROM)、随机存取存储器(Random Access Memory;以下简称:RAM)、磁碟或者光盘等各种可以存储程序代码的介质。In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk, and other media that can store program codes.

以上所述仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims (5)

1.一种电能计量装置运行误差状态评价方法,其特征在于,包括以下步骤:1. A method for evaluating the operating error state of an electric energy metering device, characterized in that it comprises the following steps: 采集若干电能计量装置的历史运行监测数据,每一历史运行监测数据包括电能计量装置运行过程中产生的多个不同种类的物理量;Collecting historical operation monitoring data of a number of electric energy metering devices, each historical operation monitoring data includes a plurality of different types of physical quantities generated during the operation of the electric energy metering device; 对采集的每一历史运行监测数据进行特征提取,包括构造特征和特征选择两个步骤;Perform feature extraction on each collected historical operation monitoring data, including two steps: feature construction and feature selection; 其中,所述构造特征步骤具体为:对于每一历史运行监测数据,通过各种类的物理量计算得出对应各物理量的峭度排序能量特征、曲线复杂度特征和相间余弦相似度特征;The step of constructing features is specifically as follows: for each historical operation monitoring data, the kurtosis sorting energy feature, the curve complexity feature and the phase cosine similarity feature corresponding to each physical quantity are calculated by various types of physical quantities; 所述特征选择步骤具体为:对于任一历史运行监测数据,对构造特征步骤中获得的特征的集合进行筛选,得到最终特征集;The feature selection step specifically includes: for any historical operation monitoring data, screening the set of features obtained in the feature construction step to obtain a final feature set; 对每一历史运行监测数据的最终特征集添加误差状态标签,形成训练样本,构建神经网络模型,通过训练样本对所述神经网络模型进行迭代训练,得到训练好的电能计量装置运行误差状态评价模型;Add error state labels to the final feature set of each historical operation monitoring data to form training samples, build a neural network model, iteratively train the neural network model through the training samples, and obtain a trained electric energy metering device operation error state evaluation model; 获取目标电能计量装置的当前运行监测数据,根据当前运行监测数据进行特征提取获得目标电能计量装置当前的最终特征集,输入至训练好的电能计量装置运行误差状态评价模型得到目标电能计量装置的误差状态评价结果;Acquire current operation monitoring data of the target electric energy metering device, perform feature extraction based on the current operation monitoring data to obtain the current final feature set of the target electric energy metering device, and input it into the trained electric energy metering device operation error state evaluation model to obtain the error state evaluation result of the target electric energy metering device; 所述电能计量装置运行过程中产生的多个不同种类的物理量具体包括:The multiple different types of physical quantities generated during the operation of the electric energy metering device specifically include: 电压数据、电流数据、有功功率数据、无功功率数据、功率因素数据、三相不平衡度数据以及负载率数据;Voltage data, current data, active power data, reactive power data, power factor data, three-phase unbalance data and load rate data; 在所述通过各种类的物理量计算得出对应各物理量的峭度排序能量特征、曲线复杂度特征和相间余弦相似度特征步骤中,所述各物理量的峭度排序能量特征的计算方法为:In the step of calculating the kurtosis sorting energy characteristics, curve complexity characteristics and inter-phase cosine similarity characteristics of each physical quantity by various types of physical quantities, the calculation method of the kurtosis sorting energy characteristics of each physical quantity is: 根据各种类的物理量绘制相应的物理量曲线,具体包括电流曲线、电压曲线、有功功率曲线、无功功率曲线、功率因素曲线、三相不平衡度曲线、负载率曲线;Draw corresponding physical quantity curves according to various types of physical quantities, including current curve, voltage curve, active power curve, reactive power curve, power factor curve, three-phase unbalance curve, and load rate curve; 对于各物理量曲线,通过峭度反映各物理量曲线随机变量分布特性的数值统计量,所述峭度K的表达式如下:For each physical quantity curve, the kurtosis reflects the numerical statistics of the random variable distribution characteristics of each physical quantity curve. The expression of the kurtosis K is as follows: ; 其中,N代表物理量曲线的信号长度;代表物理量曲线中第i个信号值;μ代表物理量曲线的信号平均值;σ代表物理量曲线的信号标准差;Where N represents the signal length of the physical quantity curve; represents the i-th signal value in the physical quantity curve; μ represents the signal average value of the physical quantity curve; σ represents the signal standard deviation of the physical quantity curve; 对于各物理量曲线中的各个信号,进行EMD经验模态分解,对分解后的信号计算峭度并根据计算出的峭度进行降序排序后,根据以下公式计算峭度排序能量E:For each signal in each physical quantity curve, perform EMD empirical mode decomposition, calculate the kurtosis of the decomposed signal and sort it in descending order according to the calculated kurtosis, and then calculate the kurtosis sorting energy E according to the following formula: ; 从而得到电流峭度排序能量特征、电压峭度排序能量特征、有功功率峭度排序能量特征、无功功率峭度排序能量特征、功率因素峭度排序能量特征、三相不平衡度峭度排序能量特征、负载率峭度排序能量特征;Thus, the current kurtosis sorting energy characteristics, voltage kurtosis sorting energy characteristics, active power kurtosis sorting energy characteristics, reactive power kurtosis sorting energy characteristics, power factor kurtosis sorting energy characteristics, three-phase unbalance kurtosis sorting energy characteristics, and load rate kurtosis sorting energy characteristics are obtained; 在所述通过各种类的物理量计算得出对应各物理量的峭度排序能量特征、曲线复杂度特征和相间余弦相似度特征步骤中,所述各物理量的曲线复杂度特征的计算方法为:In the step of calculating the kurtosis sorting energy characteristics, curve complexity characteristics and inter-phase cosine similarity characteristics corresponding to each physical quantity by various types of physical quantities, the calculation method of the curve complexity characteristics of each physical quantity is: 定义模糊熵为:Define fuzzy entropy as: ; 其中,m为相空间维数,r为相似容限度,N为时间序列的维度,为模糊隶属度函数;Among them, m is the dimension of phase space, r is the similarity tolerance, N is the dimension of time series, is the fuzzy membership function; 根据定义的模糊熵,分别计算曲线复杂度特征、第二电压曲线复杂度特征、第二有功功率曲线复杂度特征、第二无功功率曲线复杂度特征、第二功率因素曲线复杂度序特征、第二三相不平衡度曲线复杂度特征、第二负载率曲线复杂度特征分别为:According to the defined fuzzy entropy, the curve complexity characteristics are calculated respectively , the second voltage curve complexity characteristics , Complexity characteristics of the second active power curve , Complexity characteristics of the second reactive power curve , the second power factor curve complexity order characteristics 2. Complexity characteristics of the third-phase imbalance curve , Complexity characteristics of the second load rate curve They are: ; ; ; ; ; ; ; 其中,分别表示A相、B相、C相电流;分别为A相、B相、C相电压;分别表示A相、B相、C相和总的有功功率;分别表示A相、B相、C相和总的无功功率;分别表示A相、B相、C相和总的当前功率因素;为三相不平衡度数据;in, , , Respectively represent the A phase, B phase, and C phase currents; , , They are phase A, phase B, and phase C voltages respectively; , , , Respectively represent the active power of phase A, phase B, phase C and the total; , , , Respectively represent the reactive power of phase A, phase B, phase C and the total; , , , Respectively represent the current power factors of phase A, phase B, phase C and the total; It is the three-phase unbalance data; R负载率表示负载率;R load factor indicates the load factor; 在所述通过各种类的物理量计算得出对应各物理量的峭度排序能量特征、曲线复杂度特征和相间余弦相似度特征步骤中,所述各物理量的相间余弦相似度特征的计算方法为:In the step of calculating the kurtosis sorting energy characteristics, curve complexity characteristics and interphase cosine similarity characteristics corresponding to each physical quantity by various types of physical quantities, the calculation method of the interphase cosine similarity characteristics of each physical quantity is: 根据余弦相似度公式,分别计算A相和B相电流余弦相似度特征、B相和C相电流余弦相似度特征、A相和C相电流余弦相似度特征、A相和B相电压余弦相似度特征、B相和C相电压余弦相似度特征、A相和C相电压余弦相似度特征、A相和B相有功功率余弦相似度特征、B相和C相有功功率余弦相似度特征、A相和C相有功功率余弦相似度特征、A相和B相无功功率余弦相似度特征、B相和C相无功功率余弦相似度特征、A相和C相无功功率余弦相似度特征、A相和B相功率因素余弦相似度特征、B相和C相功率因素余弦相似度特征、A相和C相功率因素余弦相似度特征According to the cosine similarity formula, the cosine similarity characteristics of phase A and phase B current are calculated respectively. , B-phase and C-phase current cosine similarity characteristics , A phase and C phase current cosine similarity characteristics , A-phase and B-phase voltage cosine similarity features , B-phase and C-phase voltage cosine similarity features , A phase and C phase voltage cosine similarity characteristics , A phase and B phase active power cosine similarity characteristics , B phase and C phase active power cosine similarity characteristics , A phase and C phase active power cosine similarity characteristics , A-phase and B-phase reactive power cosine similarity characteristics , B-phase and C-phase reactive power cosine similarity characteristics , A phase and C phase reactive power cosine similarity characteristics , A phase and B phase power factor cosine similarity characteristics , B phase and C phase power factor cosine similarity characteristics , A phase and C phase power factor cosine similarity characteristics ; 其中,余弦相似度公式为:Among them, the cosine similarity formula is: ; 其中,X,Y表示X、Y向量;分别表示X、Y向量的模;Where X, Y represent X and Y vectors; , Represents the magnitude of X and Y vectors respectively; 所述对构造特征步骤中获得的特征的集合进行筛选,得到最终特征集的方法具体为:The method of screening the set of features obtained in the feature construction step to obtain the final feature set is specifically: 以各物理量的峭度排序能量特征作为第一特征集,各物理量的曲线复杂度特征作为第二特征集,各物理量的相间余弦相似度特征作为第三特征集,将第一特征集、第二特征集和第三特征集合并为第四特征集;The kurtosis sorting energy features of each physical quantity are used as the first feature set, the curve complexity features of each physical quantity are used as the second feature set, the inter-phase cosine similarity features of each physical quantity are used as the third feature set, and the first feature set, the second feature set and the third feature set are combined into a fourth feature set; 使用第一特征选择算法、第二特征选择算法、……第n特征选择算法分别对第四特征集进行特征选择,得到n个特征子集;Use the first feature selection algorithm, the second feature selection algorithm, ... the nth feature selection algorithm to perform feature selection on the fourth feature set respectively to obtain n feature subsets; 将n个特征子集合并为第五特征集;Merge n feature subsets into the fifth feature set; 使用第n+1特征选择算法对第五特征集进行特征选择,得到第六特征集,以第六特征集作为最终特征集;Use the n+1th feature selection algorithm to perform feature selection on the fifth feature set to obtain a sixth feature set, and use the sixth feature set as the final feature set; 其中,所述第一特征选择算法、第二特征选择算法、……第n特征选择算法和第n+1特征选择算法具体从方差选择法、相关系数法、卡方检验法、relief算法、递归特征消除法、基于惩罚项的特征选择法以及基于树模型的特征选择法中选取。Among them, the first feature selection algorithm, the second feature selection algorithm, ... the nth feature selection algorithm and the n+1th feature selection algorithm are specifically selected from variance selection method, correlation coefficient method, chi-square test method, relief algorithm, recursive feature elimination method, penalty-based feature selection method and tree model-based feature selection method. 2.根据权利要求1所述的一种电能计量装置运行误差状态评价方法,其特征在于,所述神经网络模型采用非线性时序预测NARX神经网络模型,并采用金鹰算法对该神经网络模型进行优化,具体步骤为:2. According to claim 1, a method for evaluating the operating error state of an electric energy metering device is characterized in that the neural network model adopts a nonlinear time series prediction NARX neural network model, and the Golden Eagle algorithm is used to optimize the neural network model, and the specific steps are: 初始化金鹰种群中金鹰个体的数量,每个金鹰包含不同的NARX神经网络模型的权重系数信息和阈值参数信息;Initialize the number of golden eagle individuals in the golden eagle population, each of which contains different weight coefficient information and threshold parameter information of the NARX neural network model; 计算金鹰个体的适应度值并根据适应度值初始化群体记忆;其中, 金鹰个体的适应度值计算公式为:Calculate the fitness value of the golden eagle individual and initialize the group memory according to the fitness value; the fitness value calculation formula of the golden eagle individual is: ; 其中,value表示适应度值,N为金鹰个体的总数,为根据第i个金鹰包含的NARX神经网络模型的权重系数信息和阈值参数信息得到的NARX神经网络模型的预测值,为第i个金鹰所对应的样本真实值;Among them, value represents the fitness value, N is the total number of golden eagle individuals, is the predicted value of the NARX neural network model obtained based on the weight coefficient information and threshold parameter information of the NARX neural network model contained in the i-th Golden Eagle, is the true value of the sample corresponding to the i-th golden eagle; 初始化金鹰的攻击倾向和巡航倾向Initialize the Golden Eagle's attack tendency and cruising tendency ; 根据以下公式更新攻击倾向和巡航倾向Update the attack tendency according to the following formula and cruising tendency : ; 其中,的初始值和最终值,的初始值和最终值;t为第t次迭代,T为总的迭代次数;in, and for The initial and final values of and for The initial and final values of ; t is the tth iteration, and T is the total number of iterations; 从种群的记忆计算的攻击向量中随机选择猎物:Prey is randomly selected from the attack vector calculated from the memory of the population: ; 其中,为第i只金鹰的攻击向量,为当前金鹰所到达的最佳地点,是第i只金鹰目前的位置;in, is the attack vector of the i-th golden eagle, This is the best place for the Golden Eagle to reach at present. is the current position of the i-th golden eagle; 计算巡航向量d:Calculate the cruise vector d: ; 其中,为法向量,为决策变量向量;in, is the normal vector, is the decision variable vector; 为超平面上的任一点,则:set up is any point on the hyperplane, then: ; 看做超平面的法线,则超平面表示为:Bundle As the normal of the hyperplane, the hyperplane is expressed as: ; 其中,为攻击向量,为决策向量,为被选中的猎物位置;表示第t次迭代时的攻击向量;in, is the attack vector, is the decision vector, The location of the selected prey; represents the attack vector at the tth iteration; 则:but: ; 其中,为目标点的第k个元素,k为固定变量的编号;in, is the kth element of the target point, k is the number of the fixed variable; 巡航超平面上目的点表示为:The destination point on the cruise hyperplane is expressed as: 金鹰迭代的步长向量定义为:The step vector of the Golden Eagle iteration is defined as: ; 其中,为[0,1]内的随机向量,通过将迭代中的步长向量加到迭代中的位置,计算出金鹰在迭代中的位置:in, and is a random vector in [0,1]. The position of the golden eagle in the iteration is calculated by adding the step vector in the iteration to the position in the iteration: 其中,为金鹰的第次位置,为金鹰的第次的位置,为金鹰的异动的步长大小;in, For the Golden Eagle Second position, For the Golden Eagle The second position, is the step size of the Golden Eagle's movement; 根据更新的新的金鹰个体的位置计算适应度值,更新最优解及最优位置;Calculate the fitness value according to the updated position of the new golden eagle individual, and update the optimal solution and optimal position; 判断是否达到最大迭代次数,达到最大迭代次数则输出当前最优位置上金鹰个体所包含的权重系数信息和阈值参数信息作为NARX神经网络模型的权重系数和阈值参数;未达到最大迭代次数则继续迭代。Determine whether the maximum number of iterations has been reached. If the maximum number of iterations has been reached, output the weight coefficient information and threshold parameter information of the golden eagle individual at the current optimal position as the weight coefficient and threshold parameter of the NARX neural network model; if the maximum number of iterations has not been reached, continue iterating. 3.一种电能计量装置运行误差状态评价系统,其特征在于,包括:3. A system for evaluating the operating error state of an electric energy metering device, comprising: 采集模块,用于采集若干电能计量装置的历史运行监测数据,每一历史运行监测数据包括电能计量装置运行过程中产生的多个不同种类的物理量;A collection module, used to collect historical operation monitoring data of a number of electric energy metering devices, each historical operation monitoring data includes a plurality of different types of physical quantities generated during the operation of the electric energy metering device; 特征提取模块,用于对采集的每一历史运行监测数据进行特征提取,包括构造特征和特征选择两个步骤;The feature extraction module is used to extract features from each collected historical operation monitoring data, including two steps: feature construction and feature selection; 其中,所述构造特征步骤具体为:对于每一历史运行监测数据,通过各种类的物理量计算得出对应各物理量的峭度排序能量特征、曲线复杂度特征和相间余弦相似度特征;The step of constructing features is specifically as follows: for each historical operation monitoring data, the kurtosis sorting energy feature, the curve complexity feature and the phase cosine similarity feature corresponding to each physical quantity are calculated by various types of physical quantities; 所述特征选择步骤具体为:对于任一历史运行监测数据,对构造特征步骤中获得的特征的集合进行筛选,得到最终特征集;The feature selection step specifically includes: for any historical operation monitoring data, screening the set of features obtained in the feature construction step to obtain a final feature set; 模型训练模块,用于对每一历史运行监测数据的最终特征集添加误差状态标签,形成训练样本,构建神经网络模型,通过训练样本对所述神经网络模型进行迭代训练,得到训练好的电能计量装置运行误差状态评价模型;A model training module is used to add an error state label to the final feature set of each historical operation monitoring data to form a training sample, construct a neural network model, and iteratively train the neural network model through the training sample to obtain a trained electric energy metering device operation error state evaluation model; 评价模块,用于获取目标电能计量装置的当前运行监测数据,根据当前运行监测数据进行特征提取获得目标电能计量装置当前的最终特征集,输入至训练好的电能计量装置运行误差状态评价模型得到目标电能计量装置的误差状态评价结果;An evaluation module is used to obtain the current operation monitoring data of the target electric energy metering device, perform feature extraction based on the current operation monitoring data to obtain the current final feature set of the target electric energy metering device, and input it into the trained electric energy metering device operation error state evaluation model to obtain the error state evaluation result of the target electric energy metering device; 所述电能计量装置运行过程中产生的多个不同种类的物理量具体包括:The multiple different types of physical quantities generated during the operation of the electric energy metering device specifically include: 电压数据、电流数据、有功功率数据、无功功率数据、功率因素数据、三相不平衡度数据以及负载率数据;Voltage data, current data, active power data, reactive power data, power factor data, three-phase unbalance data and load rate data; 在所述通过各种类的物理量计算得出对应各物理量的峭度排序能量特征、曲线复杂度特征和相间余弦相似度特征步骤中,所述各物理量的峭度排序能量特征的计算方法为:In the step of calculating the kurtosis sorting energy characteristics, curve complexity characteristics and inter-phase cosine similarity characteristics corresponding to each physical quantity by various types of physical quantities, the calculation method of the kurtosis sorting energy characteristics of each physical quantity is: 根据各种类的物理量绘制相应的物理量曲线,具体包括电流曲线、电压曲线、有功功率曲线、无功功率曲线、功率因素曲线、三相不平衡度曲线、负载率曲线;Draw corresponding physical quantity curves according to various types of physical quantities, including current curve, voltage curve, active power curve, reactive power curve, power factor curve, three-phase unbalance curve, and load rate curve; 对于各物理量曲线,通过峭度反映各物理量曲线随机变量分布特性的数值统计量,所述峭度K的表达式如下:For each physical quantity curve, the kurtosis reflects the numerical statistics of the random variable distribution characteristics of each physical quantity curve. The expression of the kurtosis K is as follows: ; 其中,N代表物理量曲线的信号长度;代表物理量曲线中第i个信号值;μ代表物理量曲线的信号平均值;σ代表物理量曲线的信号标准差;Where N represents the signal length of the physical quantity curve; represents the i-th signal value in the physical quantity curve; μ represents the signal average value of the physical quantity curve; σ represents the signal standard deviation of the physical quantity curve; 对于各物理量曲线中的各个信号,进行EMD经验模态分解,对分解后的信号计算峭度并根据计算出的峭度进行降序排序后,根据以下公式计算峭度排序能量E:For each signal in each physical quantity curve, perform EMD empirical mode decomposition, calculate the kurtosis of the decomposed signal and sort it in descending order according to the calculated kurtosis, and then calculate the kurtosis sorting energy E according to the following formula: ; 从而得到电流峭度排序能量特征、电压峭度排序能量特征、有功功率峭度排序能量特征、无功功率峭度排序能量特征、功率因素峭度排序能量特征、三相不平衡度峭度排序能量特征、负载率峭度排序能量特征;Thus, the current kurtosis sorting energy characteristics, voltage kurtosis sorting energy characteristics, active power kurtosis sorting energy characteristics, reactive power kurtosis sorting energy characteristics, power factor kurtosis sorting energy characteristics, three-phase unbalance kurtosis sorting energy characteristics, and load rate kurtosis sorting energy characteristics are obtained; 在所述通过各种类的物理量计算得出对应各物理量的峭度排序能量特征、曲线复杂度特征和相间余弦相似度特征步骤中,所述各物理量的曲线复杂度特征的计算方法为:In the step of calculating the kurtosis sorting energy characteristics, curve complexity characteristics and inter-phase cosine similarity characteristics corresponding to each physical quantity by various types of physical quantities, the calculation method of the curve complexity characteristics of each physical quantity is: 定义模糊熵为:Define fuzzy entropy as: ; 其中,m为相空间维数,r为相似容限度,N为时间序列的维度,为模糊隶属度函数;Among them, m is the dimension of phase space, r is the similarity tolerance, N is the dimension of time series, is the fuzzy membership function; 根据定义的模糊熵,分别计算曲线复杂度特征、第二电压曲线复杂度特征、第二有功功率曲线复杂度特征、第二无功功率曲线复杂度特征、第二功率因素曲线复杂度序特征、第二三相不平衡度曲线复杂度特征、第二负载率曲线复杂度特征分别为:According to the defined fuzzy entropy, the curve complexity characteristics are calculated respectively , the second voltage curve complexity characteristics , Complexity characteristics of the second active power curve , Complexity characteristics of the second reactive power curve , the second power factor curve complexity order characteristics 2. Complexity characteristics of the third-phase imbalance curve , Complexity characteristics of the second load rate curve They are: ; ; ; ; ; ; ; 其中,分别表示A相、B相、C相电流;分别为A相、B相、C相电压;分别表示A相、B相、C相和总的有功功率;分别表示A相、B相、C相和总的无功功率;分别表示A相、B相、C相和总的当前功率因素;为三相不平衡度数据;in, , , Respectively represent the A phase, B phase, and C phase currents; , , They are phase A, phase B, and phase C voltages respectively; , , , Respectively represent the active power of phase A, phase B, phase C and the total; , , , Respectively represent the reactive power of phase A, phase B, phase C and the total; , , , Respectively represent the current power factors of phase A, phase B, phase C and the total; It is the three-phase unbalance data; R负载率表示负载率;R load factor indicates the load factor; 在所述通过各种类的物理量计算得出对应各物理量的峭度排序能量特征、曲线复杂度特征和相间余弦相似度特征步骤中,所述各物理量的相间余弦相似度特征的计算方法为:In the step of calculating the kurtosis sorting energy characteristics, curve complexity characteristics and interphase cosine similarity characteristics corresponding to each physical quantity by various types of physical quantities, the calculation method of the interphase cosine similarity characteristics of each physical quantity is: 根据余弦相似度公式,分别计算A相和B相电流余弦相似度特征、B相和C相电流余弦相似度特征、A相和C相电流余弦相似度特征、A相和B相电压余弦相似度特征、B相和C相电压余弦相似度特征、A相和C相电压余弦相似度特征、A相和B相有功功率余弦相似度特征、B相和C相有功功率余弦相似度特征、A相和C相有功功率余弦相似度特征、A相和B相无功功率余弦相似度特征、B相和C相无功功率余弦相似度特征、A相和C相无功功率余弦相似度特征、A相和B相功率因素余弦相似度特征、B相和C相功率因素余弦相似度特征、A相和C相功率因素余弦相似度特征According to the cosine similarity formula, the cosine similarity characteristics of phase A and phase B current are calculated respectively. , B-phase and C-phase current cosine similarity characteristics , A phase and C phase current cosine similarity characteristics , A-phase and B-phase voltage cosine similarity features , B-phase and C-phase voltage cosine similarity features , A phase and C phase voltage cosine similarity characteristics , A phase and B phase active power cosine similarity characteristics , B phase and C phase active power cosine similarity characteristics , A phase and C phase active power cosine similarity characteristics , A-phase and B-phase reactive power cosine similarity characteristics , B-phase and C-phase reactive power cosine similarity characteristics , A phase and C phase reactive power cosine similarity characteristics , A phase and B phase power factor cosine similarity characteristics , B phase and C phase power factor cosine similarity characteristics , A phase and C phase power factor cosine similarity characteristics ; 其中,余弦相似度公式为:Among them, the cosine similarity formula is: ; 其中,X,Y表示X、Y向量;分别表示X、Y向量的模;Where X, Y represent X and Y vectors; , Represents the magnitude of X and Y vectors respectively; 所述对构造特征步骤中获得的特征的集合进行筛选,得到最终特征集的方法具体为:The method of screening the set of features obtained in the feature construction step to obtain the final feature set is specifically: 以各物理量的峭度排序能量特征作为第一特征集,各物理量的曲线复杂度特征作为第二特征集,各物理量的相间余弦相似度特征作为第三特征集,将第一特征集、第二特征集和第三特征集合并为第四特征集;The kurtosis sorting energy features of each physical quantity are used as the first feature set, the curve complexity features of each physical quantity are used as the second feature set, the inter-phase cosine similarity features of each physical quantity are used as the third feature set, and the first feature set, the second feature set and the third feature set are combined into a fourth feature set; 使用第一特征选择算法、第二特征选择算法、……第n特征选择算法分别对第四特征集进行特征选择,得到n个特征子集;Use the first feature selection algorithm, the second feature selection algorithm, ... the nth feature selection algorithm to perform feature selection on the fourth feature set respectively to obtain n feature subsets; 将n个特征子集合并为第五特征集;Merge n feature subsets into the fifth feature set; 使用第n+1特征选择算法对第五特征集进行特征选择,得到第六特征集,以第六特征集作为最终特征集;Use the n+1th feature selection algorithm to perform feature selection on the fifth feature set to obtain a sixth feature set, and use the sixth feature set as the final feature set; 其中,所述第一特征选择算法、第二特征选择算法、……第n特征选择算法和第n+1特征选择算法具体从方差选择法、相关系数法、卡方检验法、relief算法、递归特征消除法、基于惩罚项的特征选择法以及基于树模型的特征选择法中选取。Among them, the first feature selection algorithm, the second feature selection algorithm, ... the nth feature selection algorithm and the n+1th feature selection algorithm are specifically selected from variance selection method, correlation coefficient method, chi-square test method, relief algorithm, recursive feature elimination method, penalty-based feature selection method and tree model-based feature selection method. 4.一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现如权利要求1至2任一项所述的电能计量装置运行误差状态评价方法。4. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for evaluating the operating error state of an electric energy metering device as described in any one of claims 1 to 2 is implemented. 5.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1至2任一项所述的电能计量装置运行误差状态评价方法。5. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method for evaluating the operating error state of an electric energy metering device according to any one of claims 1 to 2 is implemented.
CN202310000732.XA 2023-01-03 2023-01-03 Evaluation method, system, equipment and medium for operating error state of electric energy metering device Active CN115841278B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310000732.XA CN115841278B (en) 2023-01-03 2023-01-03 Evaluation method, system, equipment and medium for operating error state of electric energy metering device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310000732.XA CN115841278B (en) 2023-01-03 2023-01-03 Evaluation method, system, equipment and medium for operating error state of electric energy metering device

Publications (2)

Publication Number Publication Date
CN115841278A CN115841278A (en) 2023-03-24
CN115841278B true CN115841278B (en) 2023-07-18

Family

ID=85579426

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310000732.XA Active CN115841278B (en) 2023-01-03 2023-01-03 Evaluation method, system, equipment and medium for operating error state of electric energy metering device

Country Status (1)

Country Link
CN (1) CN115841278B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116126945B (en) * 2023-03-30 2023-06-20 创域智能(常熟)网联科技有限公司 Sensor running state analysis method and system based on data analysis
CN116028822B (en) * 2023-03-30 2023-07-18 国网福建省电力有限公司 Electric energy meter error state evaluation method, system, equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110874685A (en) * 2018-09-04 2020-03-10 中国计量科学研究院 A method and system for judging the running state of smart electric energy meter based on neural network
CN112698261A (en) * 2020-11-25 2021-04-23 国网湖南省电力有限公司 Fault early warning method and device for intelligent electric energy meter
CN114696340A (en) * 2022-02-11 2022-07-01 南京理工大学 Wind power frequency modulation gradual inertia control method based on deep learning
CN114399032B (en) * 2022-03-23 2022-06-21 武汉格蓝若智能技术有限公司 Method and system for predicting metering error of electric energy meter
CN115392393A (en) * 2022-09-13 2022-11-25 中国核动力研究设计院 Temperature measuring instrument state detection method

Also Published As

Publication number Publication date
CN115841278A (en) 2023-03-24

Similar Documents

Publication Publication Date Title
CN109164343B (en) Transformer fault diagnosis method based on characteristic information quantization and weighted KNN
CN115841278B (en) Evaluation method, system, equipment and medium for operating error state of electric energy metering device
CN111833583B (en) Training method, device, equipment and medium for power data anomaly detection model
CN111814956B (en) A multi-task learning air quality prediction method based on multi-dimensional quadratic feature extraction
CN111985719B (en) Power load prediction method based on improved long-term and short-term memory network
CN113177357A (en) Transient stability assessment method for power system
CN114925612A (en) Transformer fault diagnosis method for optimizing hybrid kernel extreme learning machine based on sparrow search algorithm
CN115358347B (en) A Remaining Lifetime Prediction Method for Smart Meters under Different Subsystems
CN116028822A (en) Method, system, device and storage medium for evaluating error state of electric energy meter
CN113987910A (en) Method and device for identifying load of residents by coupling neural network and dynamic time planning
CN118336705A (en) Short-term load interval prediction method
CN115389955A (en) Differential pressure prediction method and device for total pressure test inside and outside battery
CN113256018B (en) Wind power ultra-short term probability prediction method based on conditional quantile regression model
CN114357870A (en) Metering equipment operation performance prediction analysis method based on local weighted partial least squares
CN116776134B (en) Photovoltaic output prediction method based on PCA-SFFS-BiGRU
CN116245259B (en) Photovoltaic power generation prediction method and device based on depth feature selection and electronic equipment
CN116776209A (en) Method, system, equipment and medium for identifying operation state of gateway metering device
CN114298413B (en) A method for predicting the swing trend of hydropower units
CN117077546A (en) Power system load modeling method and system based on data driving
CN115275977A (en) Power load prediction method and device
CN112819067A (en) Method, device, equipment and storage medium for processing bad data of power distribution network
Wang et al. Research on classified evaluation feedback algorithm for power network load identification
CN118962455B (en) Battery analysis method
CN113064962B (en) Environment complaint reporting event similarity analysis method
Ding et al. A Novel LSTM-1DCNN-based Deep Network for Fault Diagnosis in Chemical Process

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