

技术领域technical field
本发明涉及智能电表误差分析技术领域,特别地,涉及一种智能电表误差分类方法及系统、设备、计算机可读取的存储介质。The present invention relates to the technical field of error analysis of smart meters, and in particular, to a method and system for classifying errors of smart meters, equipment, and a computer-readable storage medium.
背景技术Background technique
近年来,随着经济的不断发展,我国电网规模日益扩大,电力设施日趋完善,电能计量装置数量迅速增多。其中,智能电能表作为电能计量装置的重要组成部分,其计量性能直接影响到供需双方的利益,其安全性能直接影响到设备的稳定运行,因此,对智能电表的计量误差进行准确测量至关重要。而在稳态负荷下检定合格的智能电表,在动态负荷测试信号及激励下不一定满足计量误差要求,有的甚至会产生较大误差。In recent years, with the continuous development of the economy, the scale of my country's power grid has been expanding, the power facilities have become more and more perfect, and the number of electric energy metering devices has increased rapidly. Among them, smart electric energy meter is an important part of electric energy measurement device, its measurement performance directly affects the interests of both supply and demand, and its safety performance directly affects the stable operation of equipment. Therefore, it is very important to accurately measure the measurement error of smart electric meters . However, a smart meter that is qualified under steady-state load may not meet the measurement error requirements under dynamic load test signals and excitation, and some may even generate large errors.
现阶段对智能电能表误差的动态检定都是从仿真入手,通过构建各类扰动的数学模型并探讨智能电能表在各类扰动下产生的误差。但是,由于没有使用真实的智能电表,构建的数学模型难以完全模拟输入被测电流时或功率信号快速变化时的单元响应,模拟检定结果与现场实际工况相差较大。并且,在测试信号方面,虽然检定信号使用随机信号,但仍然与现场工况仍有较大差距,现场实际工况的复杂程度要更高并伴随着诸多不确定性,从而使得实验室测得的智能电表动态误差测量结果的准确度较差。因此,现有对智能电表进行动态误差检定的方法缺乏对现场实际工况的考量,从而导致误差检定结果的准确度较差,并且,也无法分辨出实际工况的扰动类型。At this stage, the dynamic verification of the error of the smart energy meter starts from the simulation, by constructing the mathematical models of various disturbances and discussing the errors of the smart energy meter under various disturbances. However, because the real smart meter is not used, it is difficult for the constructed mathematical model to fully simulate the unit response when the measured current is input or when the power signal changes rapidly, and the simulation verification results are quite different from the actual working conditions in the field. In addition, in terms of test signals, although the verification signal uses random signals, there is still a big gap with the field conditions. The actual field conditions are more complex and accompanied by many uncertainties, which makes the laboratory test results. The accuracy of the dynamic error measurement results of the smart meter is poor. Therefore, the existing methods for dynamic error verification of smart meters lack consideration of the actual working conditions in the field, resulting in poor accuracy of the error verification results, and inability to distinguish the disturbance type of the actual working conditions.
发明内容SUMMARY OF THE INVENTION
本发明提供了一种智能电表误差分类方法及系统、设备、存储介质,以解决现有对智能电表进行动态误差检定的方法存在的误差检定结果准确度差、无法分辨实际工况的扰动类型的技术问题。The present invention provides a smart meter error classification method, system, equipment and storage medium, so as to solve the problems of poor accuracy of error verification results and inability to distinguish the disturbance type of actual working conditions in the existing method for dynamic error verification of smart meters. technical problem.
根据本发明的一个方面,提供一种智能电表误差分类方法,包括以下内容:According to one aspect of the present invention, a method for classifying errors of smart meters is provided, including the following:
采集现场工况的原始信号,对原始信号进行分解后得到各个单一扰动信号的幅频信息,并导出原始信号的波形图数据矩阵;Collect the original signal of the on-site working condition, decompose the original signal to obtain the amplitude-frequency information of each single disturbance signal, and derive the waveform data matrix of the original signal;
基于各个单一扰动信号的幅频信息对应建立各个单一扰动信号的数学模型;Based on the amplitude-frequency information of each single disturbance signal, the mathematical model of each single disturbance signal is correspondingly established;
基于各个单一扰动信号的数学模型生成模拟扰动信号,并采用生成的模拟扰动信号对智能电表进行检定,得到智能电表的误差数据;Based on the mathematical model of each single disturbance signal, an analog disturbance signal is generated, and the generated analog disturbance signal is used to verify the smart meter, and the error data of the smart meter is obtained;
将智能电表的误差数据、模拟扰动信号的扰动参数分别作为一列扩增到波形图数据矩阵中,得到模拟扰动信号的数据集矩阵,并对所述数据集矩阵进行打标签,标签内容包括模拟扰动信号的扰动类型和智能电表的误差数据;Amplify the error data of the smart meter and the disturbance parameters of the analog disturbance signal as a column into the waveform graph data matrix, to obtain a data set matrix of the analog disturbance signal, and label the data set matrix, and the content of the label includes the analog disturbance. The disturbance type of the signal and the error data of the smart meter;
构建多层感知器模型,利用带有标签的数据集矩阵对所述多层感知器模型进行训练;constructing a multi-layer perceptron model, and training the multi-layer perceptron model using a labeled dataset matrix;
利用训练好的多层感知器模型对待检测信号进行检测,输出待检测信号的扰动类型及智能电表对应产生的误差。The trained multi-layer perceptron model is used to detect the signal to be detected, and the disturbance type of the signal to be detected and the corresponding error generated by the smart meter are output.
进一步地,所述单一扰动信号包括电压暂升、电压暂降、电压中断、电压闪变、谐波和间歇波中的至少一种。Further, the single disturbance signal includes at least one of voltage swell, voltage sag, voltage interruption, voltage flicker, harmonic wave and intermittent wave.
进一步地,所述模拟扰动信号的扰动类型包括单一扰动信号和复合扰动信号,其中,复合扰动信号包括谐波与间歇波同时存在、谐波与闪变同时存在、谐波与电压暂升同时存在、谐波与电压暂降同时存在、谐波与电压中断同时存在。Further, the disturbance types of the analog disturbance signal include a single disturbance signal and a compound disturbance signal, wherein the compound disturbance signal includes the simultaneous existence of harmonics and intermittent waves, the simultaneous existence of harmonics and flicker, and the simultaneous existence of harmonics and voltage swells. , Harmonics and voltage sags coexist, harmonics and voltage interruptions coexist.
进一步地,所述多层感知器模型采用的损失函数通过多种损失函数加权优化得到:Further, the loss function adopted by the multi-layer perceptron model is obtained by weighted optimization of various loss functions:
其中,表示优化后的损失函数,表示Focal Loss、KLDivergence、Hinge Loss和Cross Entropy这四种损失函数中的任一种,αi表示第i个损失函数的加权参数。in, represents the optimized loss function, Represents any of the four loss functions of Focal Loss, KLDivergence, Hinge Loss and Cross Entropy, and αi represents the weighting parameter of the ith loss function.
进一步地,所述加权参数αi的求解过程为:Further, the solution process of the weighting parameter αi is:
采用Softmax函数将多分类的输出值转换为概率函数pi,其中,Zi表示第i个节点的输出值,C为输出的节点;Using the Softmax function to convert the output value of the multi-classification into a probability function pi , Among them, Zi represents the output value of the ith node, and C is the output node;
从均匀分布中采样得到随机数值ui,经过变换得到变换参数gi,其中,ui=Uniform(0,1),gi=-log(-log(ui));The random valueui is obtained by sampling from the uniform distribution, and the transformation parametergi is obtained after transformation, wherein,ui =Uniform(0,1),gi =-log(-log(ui ));
引入超参数τ控制加权参数αi的平滑度,计算公式为:The hyperparameter τ is introduced to control the smoothness of the weighting parameter αi , and the calculation formula is:
进一步地,所述模拟扰动信号的扰动参数包括谐波幅值、间歇波幅值、谐波频率、间歇波频率、电压闪变幅值、电压闪变频率、电压暂升/暂降/中断的等待时间、电压暂升/暂降/中断的骤变时间、电压暂升/暂降/中断的保持时间、电压暂升/暂降/中断的幅值。Further, the disturbance parameters of the analog disturbance signal include harmonic amplitude, intermittent wave amplitude, harmonic frequency, intermittent wave frequency, voltage flicker amplitude, voltage flicker frequency, voltage swell/sag/interruption. Waiting time, sudden change time of voltage swell/sag/interruption, hold time of voltage swell/sag/interruption, amplitude of voltage swell/sag/interruption.
进一步地,所述波形图数据矩阵的像素为28*28,将10个智能电表误差数据和18个扰动参数分别作为一列扩增到波形图数据矩阵中,其余像素补零后得到30*30的数据集矩阵。Further, the pixels of the waveform data matrix are 28*28, 10 smart meter error data and 18 disturbance parameters are respectively expanded into the waveform data matrix as a column, and the remaining pixels are filled with zeros to obtain 30*30. Dataset matrix.
另外,本发明的另一实施例还提供一种智能电表误差分类系统,包括:In addition, another embodiment of the present invention also provides a smart meter error classification system, including:
信号分解模块,用于采集现场工况的原始信号,并对原始信号进行分解后得到各个单一扰动信号的幅频信息,并导出原始信号的波形图数据矩阵;The signal decomposition module is used to collect the original signal of the on-site working condition, decompose the original signal to obtain the amplitude-frequency information of each single disturbance signal, and derive the waveform data matrix of the original signal;
建模模块,用于基于各个单一扰动信号的幅频信息对应建立各个单一扰动信号的数学模型;The modeling module is used to correspondingly establish a mathematical model of each single disturbance signal based on the amplitude-frequency information of each single disturbance signal;
电表误差分析模块,用于基于各个单一扰动信号的数学模型生成模拟扰动信号,并采用生成的模拟扰动信号对智能电表进行检定,得到智能电表的误差数据;The meter error analysis module is used to generate an analog disturbance signal based on the mathematical model of each single disturbance signal, and use the generated analog disturbance signal to verify the smart meter to obtain the error data of the smart meter;
数据集构建模块,用于将智能电表的误差数据、模拟扰动信号的扰动参数分别作为一列扩增到波形图数据矩阵中,得到模拟扰动信号的数据集矩阵,并对所述数据集矩阵进行打标签,标签内容包括模拟扰动信号的扰动类型和智能电表的误差数据;The data set building module is used to amplify the error data of the smart meter and the disturbance parameters of the analog disturbance signal as a column into the waveform data matrix, to obtain the data set matrix of the analog disturbance signal, and perform a pattern on the data set matrix. Label, the content of the label includes the disturbance type of the simulated disturbance signal and the error data of the smart meter;
模型训练模块,用于构建多层感知器模型,并利用带有标签的数据集矩阵对所述多层感知器模型进行训练;a model training module for constructing a multi-layer perceptron model, and training the multi-layer perceptron model using a labeled dataset matrix;
检测分析模块,用于利用训练好的多层感知器模型对待检测信号进行检测,输出待检测信号的扰动类型及智能电表对应产生的误差。The detection and analysis module is used to detect the signal to be detected by using the trained multi-layer perceptron model, and output the disturbance type of the signal to be detected and the corresponding error generated by the smart meter.
另外,本发明的另一实施例还提供一种设备,包括处理器和存储器,所述存储器中存储有计算机程序,所述处理器通过调用所述存储器中存储的所述计算机程序,用于执行如上所述的方法的步骤。In addition, another embodiment of the present invention also provides a device, including a processor and a memory, where a computer program is stored in the memory, and the processor is configured to execute the computer program by invoking the computer program stored in the memory The steps of the method as described above.
另外,本发明的另一实施例还提供一种计算机可读取的存储介质,用于存储适用于智能电表误差分类的计算机程序,所述计算机程序在计算机上运行时执行如上所述的方法的步骤。In addition, another embodiment of the present invention also provides a computer-readable storage medium for storing a computer program suitable for smart meter error classification, the computer program executing the above-mentioned method when running on a computer step.
本发明具有以下效果:The present invention has the following effects:
本发明的智能电表误差分类方法,首先通过采集现场工况的原始信号进行分解后得到各个单一扰动信号的幅频信息,并对应建立数学模型,然后再基于各个单一扰动信号的数学模型生成模拟扰动信号对智能电表进行检定,以得到智能电表在不同模拟扰动信号下产生的动态误差数据,一方面使用了真实电表进行检定,智能电表可以对模拟扰动信号做出快速响应,误差检定结果更符合现场实际工况,另一方面,检定采用的模拟扰动信号是基于现场工况的原始信号分解后得到的单一扰动信号生成的,更贴合实际工况,智能电表的误差检定结果准确度高。并且,将智能电表的误差数据、模拟扰动信号的扰动参数与原始信号的波形图数据矩阵相结合以构建数据集矩阵对分类模型进行训练,实现了数据扩增,提高了分类模型的分类准确度,可以高精度地分辨出待检测电网信号的扰动类型以及准确地测量出智能电表在不同扰动类型下对应产生的误差。The smart meter error classification method of the present invention firstly obtains the amplitude-frequency information of each single disturbance signal by decomposing the original signal of the collected field conditions, and establishes a corresponding mathematical model, and then generates an analog disturbance based on the mathematical model of each single disturbance signal. The signal is used to verify the smart meter to obtain the dynamic error data generated by the smart meter under different analog disturbance signals. On the one hand, the real meter is used for verification. The smart meter can respond quickly to the analog disturbance signal, and the error verification results are more in line with the scene. On the other hand, the simulated disturbance signal used in the verification is generated based on a single disturbance signal obtained by decomposing the original signal of the on-site working condition, which is more suitable for the actual working condition, and the error verification result of the smart meter has high accuracy. In addition, the error data of the smart meter, the disturbance parameters of the simulated disturbance signal and the waveform data matrix of the original signal are combined to construct a data set matrix to train the classification model, which realizes data expansion and improves the classification accuracy of the classification model. , the disturbance type of the grid signal to be detected can be distinguished with high precision and the corresponding errors of the smart meter under different disturbance types can be accurately measured.
另外,本发明的智能电表误差分类系统同样具有上述优点。In addition, the smart meter error classification system of the present invention also has the above advantages.
除了上面所描述的目的、特征和优点之外,本发明还有其它的目的、特征和优点。下面将参照图,对本发明作进一步详细的说明。In addition to the objects, features and advantages described above, the present invention has other objects, features and advantages. The present invention will be described in further detail below with reference to the drawings.
附图说明Description of drawings
构成本申请的一部分的附图用来提供对本发明的进一步理解,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings constituting a part of the present application are used to provide further understanding of the present invention, and the exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the attached image:
图1是本发明优选实施例的智能电表误差分类方法的流程示意图。FIG. 1 is a schematic flowchart of an error classification method for a smart meter according to a preferred embodiment of the present invention.
图2是本发明另一实施例的智能电表误差分类系统的模块结构示意图。FIG. 2 is a schematic structural diagram of a module of a smart meter error classification system according to another embodiment of the present invention.
具体实施方式Detailed ways
以下结合附图对本发明的实施例进行详细说明,但是本发明可以由下述所限定和覆盖的多种不同方式实施。The embodiments of the present invention will be described in detail below with reference to the accompanying drawings, but the present invention can be implemented in many different ways as defined and covered below.
如图1所示,本发明的优选实施例提供一种智能电表误差分类方法,包括以下内容:As shown in FIG. 1 , a preferred embodiment of the present invention provides a smart meter error classification method, including the following contents:
步骤S1:采集现场工况的原始信号,对原始信号进行分解后得到各个单一扰动信号的幅频信息,并导出原始信号的波形图数据矩阵;Step S1: collecting the original signal of the on-site working condition, decomposing the original signal to obtain the amplitude-frequency information of each single disturbance signal, and deriving the waveform data matrix of the original signal;
步骤S2:基于各个单一扰动信号的幅频信息对应建立各个单一扰动信号的数学模型;Step S2: correspondingly establish a mathematical model of each single disturbance signal based on the amplitude-frequency information of each single disturbance signal;
步骤S3:基于各个单一扰动信号的数学模型生成模拟扰动信号,并采用生成的模拟扰动信号对智能电表进行检定,得到智能电表的误差数据;Step S3: generating an analog disturbance signal based on the mathematical model of each single disturbance signal, and using the generated analog disturbance signal to verify the smart meter to obtain error data of the smart meter;
步骤S4:将智能电表的误差数据、模拟扰动信号的扰动参数分别作为一列扩增到波形图数据矩阵中,得到模拟扰动信号的数据集矩阵,并对所述数据集矩阵进行打标签,标签内容包括模拟扰动信号的扰动类型和智能电表的误差数据;Step S4: Amplify the error data of the smart meter and the disturbance parameters of the analog disturbance signal as a column into the waveform data matrix, to obtain a data set matrix of the analog disturbance signal, and label the data set matrix. Including the disturbance type of the analog disturbance signal and the error data of the smart meter;
步骤S5:构建多层感知器模型,利用带有标签的数据集矩阵对所述多层感知器模型进行训练;Step S5: constructing a multi-layer perceptron model, and using a labeled data set matrix to train the multi-layer perceptron model;
步骤S6:利用训练好的多层感知器模型对待检测信号进行检测,输出待检测信号的扰动类型及智能电表对应产生的误差。Step S6: use the trained multi-layer perceptron model to detect the signal to be detected, and output the disturbance type of the signal to be detected and the corresponding error generated by the smart meter.
可以理解,本实施例的智能电表误差分类方法,首先通过采集现场工况的原始信号进行分解后得到各个单一扰动信号的幅频信息,并对应建立数学模型,然后再基于各个单一扰动信号的数学模型生成模拟扰动信号对智能电表进行检定,以得到智能电表在不同模拟扰动信号下产生的动态误差数据,一方面使用了真实电表进行检定,智能电表可以对模拟扰动信号做出快速响应,误差检定结果更符合现场实际工况,另一方面,检定采用的模拟扰动信号是基于现场工况的原始信号分解后得到的单一扰动信号生成的,更贴合实际工况,智能电表的误差检定结果准确度高。并且,将智能电表的误差数据、模拟扰动信号的扰动参数与原始信号的波形图数据矩阵相结合以构建数据集矩阵对分类模型进行训练,实现了数据扩增,提高了分类模型的分类准确度,可以高精度地分辨出待检测电网信号的扰动类型以及准确地测量出智能电表在不同扰动类型下对应产生的误差。It can be understood that, in the method for classifying errors of smart meters in this embodiment, the amplitude-frequency information of each single disturbance signal is first obtained by decomposing the original signal of the collected field conditions, and a corresponding mathematical model is established, and then based on the mathematical model of each single disturbance signal. The model generates an analog disturbance signal to verify the smart meter to obtain the dynamic error data generated by the smart meter under different analog disturbance signals. On the one hand, the real meter is used for verification. The results are more in line with the actual working conditions on site. On the other hand, the simulated disturbance signal used in the verification is generated based on a single disturbance signal obtained by decomposing the original signal of the on-site working condition, which is more in line with the actual working condition, and the error verification result of the smart meter is accurate. high degree. In addition, the error data of the smart meter, the disturbance parameters of the simulated disturbance signal and the waveform data matrix of the original signal are combined to construct a data set matrix to train the classification model, which realizes data expansion and improves the classification accuracy of the classification model. , the disturbance type of the grid signal to be detected can be distinguished with high precision and the corresponding errors of the smart meter under different disturbance types can be accurately measured.
可以理解,在所述步骤S1中,可以采用NI公司的RM-26999型功率测量调节器连接PXIe-6356型数据采集模块对现场工况的原始信号进行数据采集,采样率为10KHz,其中,RM-26999由一个24V直流电源供电,基频信号频率为50Hz。然后,将采集到的原始信号导入Matlab,通过编程采用离散傅里叶变换或者快速傅里叶变换对原始信号进行分解,从而可以得到正常信号和各个单一扰动信号的幅频信息,还可以生成波形图并导出波形图数据矩阵。其中,所述波形图数据矩阵的像素值大小为28*28。It can be understood that in the step S1, the RM-26999 power measurement regulator of NI company can be used to connect the PXIe-6356 data acquisition module to collect data on the original signal of the field working condition, and the sampling rate is 10KHz, wherein the RM The -26999 is powered by a 24V DC power supply with a fundamental signal frequency of 50Hz. Then, import the collected original signal into Matlab, and use discrete Fourier transform or fast Fourier transform to decompose the original signal through programming, so that the amplitude-frequency information of the normal signal and each single disturbance signal can be obtained, and the waveform can also be generated. graph and export the waveform graph data matrix. The pixel value size of the waveform data matrix is 28*28.
可以理解,在所述步骤S2中,基于步骤S1分解可以得到多个单一扰动信号,其中,所述单一扰动信号包括电压暂升、电压暂降、电压中断、电压闪变、谐波和间歇波中的至少一种。另外,基于各个单一扰动信号的幅频信息建立的数学模型如下:It can be understood that in the step S2, a plurality of single disturbance signals can be obtained based on the decomposition of the step S1, wherein the single disturbance signal includes voltage swell, voltage sag, voltage interruption, voltage flicker, harmonics and intermittent waves. at least one of them. In addition, the mathematical model established based on the amplitude-frequency information of each single disturbance signal is as follows:
电压暂升/暂降/中断:x1(t)=(1+a0(b0(t-t1)-b0(t-t2)))cos(ω0t);Voltage swell/sag/interruption: x1 (t)=(1+a0 (b0 (tt1 )-b0 (tt2 )))cos(ω0 t);
谐波/间歇波:Harmonic/Intermittent Waves:
电压闪变:x3(t)=(1+a1cos(b1ω3t))cos(ω4t);Voltage flicker: x3 (t)=(1+a1 cos(b1 ω3 t))cos(ω4 t);
其中,a,b,t,ω为信号参数,分别为幅值、时间、相角。Among them, a, b, t, and ω are signal parameters, which are amplitude, time, and phase angle, respectively.
可以理解,在所述步骤S3中,考虑到智能电表的误差分类主要是由电网端的复合扰动引起的,而常见的复合扰动包括五种情况,谐波与间歇波同时存在、谐波与闪变同时存在、谐波与电压暂升同时存在、谐波与电压暂降同时存在、谐波与电压中断同时存在。采用电能质量分析仪HL-610S基于各个单一扰动信号的数学模型随机生成模拟扰动信号,其中,所述模拟扰动信号的扰动类型包括上述六种单一扰动和五种复合扰动。将电能质量分析仪与智能电表连接,被校表有功脉冲常数设为1200,校验圈数设为10,分频系数设为10,测量次数设为10,利用电能质量分析仪来测量智能电表在不同模拟扰动信号输入时产生的误差数据。It can be understood that in the step S3, it is considered that the error classification of the smart meter is mainly caused by the compound disturbance at the power grid end, and the common compound disturbance includes five situations, the simultaneous existence of harmonics and intermittent waves, harmonics and flicker. Simultaneous existence, harmonics and voltage swells, harmonics and voltage sags, harmonics and voltage interruptions. A power quality analyzer HL-610S is used to randomly generate an analog disturbance signal based on the mathematical model of each single disturbance signal, wherein the disturbance types of the analog disturbance signal include the above-mentioned six single disturbances and five compound disturbances. Connect the power quality analyzer to the smart meter, set the active pulse constant of the calibrated meter to 1200, set the number of calibration turns to 10, set the frequency division factor to 10, and set the number of measurements to 10, and use the power quality analyzer to measure the smart meter Error data generated when different analog disturbance signals are input.
可以理解,在所述步骤S4中,将10个智能电表误差数据和18个扰动参数分别作为一列扩增到28*28的波形图数据矩阵中,其余像素补零后得到30*30的数据集矩阵。其中,所述模拟扰动信号的扰动参数包括谐波幅值、间歇波幅值、谐波频率、间歇波频率、电压闪变幅值、电压闪变频率、电压暂升/暂降/中断的等待时间、电压暂升/暂降/中断的骤变时间、电压暂升/暂降/中断的保持时间、电压暂升/暂降/中断的幅值。另外,所述扰动参数即为电能质量分析仪的输入参数。然后,针对数据集矩阵打标签,标签内容包括模拟扰动信号的扰动类型和智能电表的误差数据。It can be understood that in the step S4, 10 smart meter error data and 18 disturbance parameters are respectively expanded into a 28*28 waveform data matrix as a column, and the remaining pixels are zero-filled to obtain a 30*30 data set matrix. Wherein, the disturbance parameters of the analog disturbance signal include harmonic amplitude, intermittent wave amplitude, harmonic frequency, intermittent wave frequency, voltage flicker amplitude, voltage flicker frequency, waiting for voltage swell/sag/interruption Time, sudden change time of voltage swell/sag/interruption, hold time of voltage swell/sag/interruption, amplitude of voltage swell/sag/interruption. In addition, the disturbance parameter is the input parameter of the power quality analyzer. Then, label the data set matrix, and the label content includes the disturbance type of the simulated disturbance signal and the error data of the smart meter.
可以理解,在所述步骤S5中,所述多层感知器模型包括输入层、两层隐含层和输出层,其中,输入层为数据集矩阵,输出层为扰动类型和智能电表的误差数据,即分类标签,每个隐含层由16个神经元全连接组成,采用的激活函数为Relu,采用的损失函数通过多种损失函数加权优化得到:It can be understood that in the step S5, the multi-layer perceptron model includes an input layer, two hidden layers and an output layer, wherein the input layer is a data set matrix, and the output layer is the disturbance type and the error data of the smart meter. , that is, the classification label, each hidden layer is composed of 16 neurons fully connected, the activation function used is Relu, and the loss function used is obtained by weighted optimization of various loss functions:
其中,表示优化后的损失函数,表示Focal Loss、KLDivergence、Hinge Loss和Cross Entropy这四种损失函数中的任一种,αi表示第i个损失函数的加权参数。in, represents the optimized loss function, Represents any of the four loss functions of Focal Loss, KLDivergence, Hinge Loss and Cross Entropy, and αi represents the weighting parameter of the ith loss function.
可以理解,所述多层感知器模型通过采用多种损失函数进行加权优化,相对于现有采用单损失函数的分类模型,提高了模型的通用性,并且实现了数据优化。It can be understood that the multi-layer perceptron model uses multiple loss functions for weighted optimization, which improves the versatility of the model and realizes data optimization compared to the existing classification model using a single loss function.
其中,所述步骤S5采用Gumbel-softmax技巧优化损失函数,即对加权参数进行求解,所述加权参数αi的求解过程具体为:Wherein, the step S5 adopts the Gumbel-softmax technique to optimize the loss function, that is, the weighting parameter is solved, and the solving process of the weighting parameter αi is specifically:
采用Softmax函数将多分类的输出值转换为概率函数pi,其中,Zi表示第i个节点的输出值,C为输出的节点;Using the Softmax function to convert the output value of the multi-classification into a probability function pi , Among them, Zi represents the output value of the ith node, and C is the output node;
从均匀分布中采样得到随机数值ui,经过变换得到变换参数gi,其中,ui=Uniform(0,1),gi=-log(-log(ui));The random valueui is obtained by sampling from the uniform distribution, and the transformation parametergi is obtained after transformation, wherein,ui =Uniform(0,1),gi =-log(-log(ui ));
引入超参数τ控制加权参数αi的平滑度,计算公式为:The hyperparameter τ is introduced to control the smoothness of the weighting parameter αi , and the calculation formula is:
可以理解,在所述步骤S6中,对待检测信号进行上述处理后得到数据集矩阵,将得到的数据集矩阵输入训练好的多层感知器模型,自动输出待检测电网信号的扰动类型和智能电表对应产生的误差。It can be understood that in the step S6, the data set matrix is obtained after the above-mentioned processing of the signal to be detected, the obtained data set matrix is input into the trained multilayer perceptron model, and the disturbance type of the grid signal to be detected and the smart meter are automatically output. corresponding errors.
另外,如图2所示,本发明的另一实施例还提供一种智能电表误差分类系统,优选采用上述实施例的方法,该系统包括:In addition, as shown in FIG. 2, another embodiment of the present invention also provides a smart meter error classification system, preferably using the method of the above embodiment, the system includes:
信号分解模块,用于采集现场工况的原始信号,并对原始信号进行分解后得到各个单一扰动信号的幅频信息,并导出原始信号的波形图数据矩阵;The signal decomposition module is used to collect the original signal of the on-site working condition, decompose the original signal to obtain the amplitude-frequency information of each single disturbance signal, and derive the waveform data matrix of the original signal;
建模模块,用于基于各个单一扰动信号的幅频信息对应建立各个单一扰动信号的数学模型;The modeling module is used to correspondingly establish a mathematical model of each single disturbance signal based on the amplitude-frequency information of each single disturbance signal;
电表误差分析模块,用于基于各个单一扰动信号的数学模型生成模拟扰动信号,并采用生成的模拟扰动信号对智能电表进行检定,得到智能电表的误差数据;The meter error analysis module is used to generate an analog disturbance signal based on the mathematical model of each single disturbance signal, and use the generated analog disturbance signal to verify the smart meter to obtain the error data of the smart meter;
数据集构建模块,用于将智能电表的误差数据、模拟扰动信号的扰动参数分别作为一列扩增到波形图数据矩阵中,得到模拟扰动信号的数据集矩阵,并对所述数据集矩阵进行打标签,标签内容包括模拟扰动信号的扰动类型和智能电表的误差数据;The data set building module is used to amplify the error data of the smart meter and the disturbance parameters of the analog disturbance signal as a column into the waveform data matrix, to obtain the data set matrix of the analog disturbance signal, and perform a pattern on the data set matrix. Label, the content of the label includes the disturbance type of the simulated disturbance signal and the error data of the smart meter;
模型训练模块,用于构建多层感知器模型,并利用带有标签的数据集矩阵对所述多层感知器模型进行训练;a model training module for constructing a multi-layer perceptron model, and training the multi-layer perceptron model using a labeled dataset matrix;
检测分析模块,用于利用训练好的多层感知器模型对待检测信号进行检测,输出待检测信号的扰动类型及智能电表对应产生的误差。The detection and analysis module is used to detect the signal to be detected by using the trained multi-layer perceptron model, and output the disturbance type of the signal to be detected and the corresponding error generated by the smart meter.
可以理解,本实施例的智能电表误差分类系统,首先通过采集现场工况的原始信号进行分解后得到各个单一扰动信号的幅频信息,并对应建立数学模型,然后再基于各个单一扰动信号的数学模型生成模拟扰动信号对智能电表进行检定,以得到智能电表在不同模拟扰动信号下产生的动态误差数据,一方面使用了真实电表进行检定,智能电表可以对模拟扰动信号做出快速响应,误差检定结果更符合现场实际工况,另一方面,检定采用的模拟扰动信号是基于现场工况的原始信号分解后得到的单一扰动信号生成的,更贴合实际工况,智能电表的误差检定结果准确度高。并且,将智能电表的误差数据、模拟扰动信号的扰动参数与原始信号的波形图数据矩阵相结合以构建数据集矩阵对分类模型进行训练,实现了数据扩增,提高了分类模型的分类准确度,可以高精度地分辨出待检测电网信号的扰动类型以及准确地测量出智能电表在不同扰动类型下对应产生的误差。It can be understood that, in the smart meter error classification system of this embodiment, the amplitude-frequency information of each single disturbance signal is obtained by first decomposing the original signal of the collected field conditions, and correspondingly establishes a mathematical model, and then based on the mathematical model of each single disturbance signal. The model generates an analog disturbance signal to verify the smart meter to obtain the dynamic error data generated by the smart meter under different analog disturbance signals. On the one hand, the real meter is used for verification. The results are more in line with the actual working conditions on site. On the other hand, the simulated disturbance signal used in the verification is generated based on a single disturbance signal obtained by decomposing the original signal of the on-site working condition, which is more in line with the actual working condition, and the error verification result of the smart meter is accurate. high degree. In addition, the error data of the smart meter, the disturbance parameters of the simulated disturbance signal and the waveform data matrix of the original signal are combined to construct a data set matrix to train the classification model, which realizes data expansion and improves the classification accuracy of the classification model. , the disturbance type of the grid signal to be detected can be distinguished with high precision and the corresponding errors of the smart meter under different disturbance types can be accurately measured.
另外,本发明的另一实施例还提供一种设备,包括处理器和存储器,所述存储器中存储有计算机程序,所述处理器通过调用所述存储器中存储的所述计算机程序,用于执行如上所述的方法的步骤。In addition, another embodiment of the present invention also provides a device, including a processor and a memory, where a computer program is stored in the memory, and the processor is configured to execute the computer program by invoking the computer program stored in the memory The steps of the method as described above.
另外,本发明的另一实施例还提供一种计算机可读取的存储介质,用于存储适用于智能电表误差分类的计算机程序,所述计算机程序在计算机上运行时执行如上所述的方法的步骤。In addition, another embodiment of the present invention also provides a computer-readable storage medium for storing a computer program suitable for smart meter error classification, the computer program executing the above-mentioned method when running on a computer step.
一般计算机可读取存储介质的形式包括:软盘(floppy disk)、可挠性盘片(flexible disk)、硬盘、磁带、任何其与的磁性介质、CD-ROM、任何其余的光学介质、打孔卡片(punch cards)、纸带(paper tape)、任何其余的带有洞的图案的物理介质、随机存取存储器(RAM)、可编程只读存储器(PROM)、可抹除可编程只读存储器(EPROM)、快闪可抹除可编程只读存储器(FLASH-EPROM)、其余任何存储器芯片或卡匣、或任何其余可让计算机读取的介质。指令可进一步被一传输介质所传送或接收。传输介质这一术语可包含任何有形或无形的介质,其可用来存储、编码或承载用来给机器执行的指令,并且包含数字或模拟通信信号或其与促进上述指令的通信的无形介质。传输介质包含同轴电缆、铜线以及光纤,其包含了用来传输一计算机数据信号的总线的导线。Typical forms of computer readable storage media include: floppy disks, flexible disks, hard disks, magnetic tapes, any other magnetic media, CD-ROMs, any other optical media, punched Punch cards, paper tape, any other physical medium with a pattern of holes, random access memory (RAM), programmable read only memory (PROM), erasable programmable read only memory (EPROM), Flash Erasable Programmable Read Only Memory (FLASH-EPROM), any other memory chip or cartridge, or any other computer readable medium. The instructions may further be transmitted or received by a transmission medium. The term transmission medium can include any tangible or intangible medium that can be used to store, encode, or carry instructions for execution by a machine, and includes digital or analog communication signals or their intangible medium that facilitates communication of such instructions. Transmission media include coaxial cables, copper wire, and fiber optics, which contain the wires of a bus used to transmit a computer data signal.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210429500.1ACN114897006A (en) | 2022-04-22 | 2022-04-22 | Smart meter error classification method and system, equipment and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210429500.1ACN114897006A (en) | 2022-04-22 | 2022-04-22 | Smart meter error classification method and system, equipment and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN114897006Atrue CN114897006A (en) | 2022-08-12 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210429500.1APendingCN114897006A (en) | 2022-04-22 | 2022-04-22 | Smart meter error classification method and system, equipment and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN114897006A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115754875A (en)* | 2022-11-03 | 2023-03-07 | 国网安徽省电力有限公司营销服务中心 | A method and device for evaluating errors of voltage transformers |
| CN119472476A (en)* | 2025-01-14 | 2025-02-18 | 上海纳宇电气有限公司 | An Internet of Things integrated control system based on electric energy meter |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106405464A (en)* | 2016-10-10 | 2017-02-15 | 国网四川省电力公司电力科学研究院 | Method for generating traceable random waveform analog power signals |
| CN109359693A (en)* | 2018-10-24 | 2019-02-19 | 国网上海市电力公司 | A Power Quality Disturbance Classification Method |
| CN111650548A (en)* | 2020-04-23 | 2020-09-11 | 宁夏隆基宁光仪表股份有限公司 | Intelligent electric energy meter metering data remote online monitoring system and method |
| CN113642592A (en)* | 2020-04-27 | 2021-11-12 | 武汉Tcl集团工业研究院有限公司 | Training method of training model, scene recognition method and computer equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106405464A (en)* | 2016-10-10 | 2017-02-15 | 国网四川省电力公司电力科学研究院 | Method for generating traceable random waveform analog power signals |
| CN109359693A (en)* | 2018-10-24 | 2019-02-19 | 国网上海市电力公司 | A Power Quality Disturbance Classification Method |
| CN111650548A (en)* | 2020-04-23 | 2020-09-11 | 宁夏隆基宁光仪表股份有限公司 | Intelligent electric energy meter metering data remote online monitoring system and method |
| CN113642592A (en)* | 2020-04-27 | 2021-11-12 | 武汉Tcl集团工业研究院有限公司 | Training method of training model, scene recognition method and computer equipment |
| Title |
|---|
| 胡珊珊,等: "基于多层感知机的多维条件下电能表准确度预测模型", 《电测与仪表》, vol. 55, no. 16, 25 August 2018 (2018-08-25), pages 125* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115754875A (en)* | 2022-11-03 | 2023-03-07 | 国网安徽省电力有限公司营销服务中心 | A method and device for evaluating errors of voltage transformers |
| CN115754875B (en)* | 2022-11-03 | 2023-08-11 | 国网安徽省电力有限公司营销服务中心 | Voltage transformer error assessment method and device |
| CN119472476A (en)* | 2025-01-14 | 2025-02-18 | 上海纳宇电气有限公司 | An Internet of Things integrated control system based on electric energy meter |
| Publication | Publication Date | Title |
|---|---|---|
| US9910081B2 (en) | Performance analysis of power grid monitors | |
| CN114897006A (en) | Smart meter error classification method and system, equipment and storage medium | |
| CN116610998A (en) | Switch cabinet fault diagnosis method and system based on multi-mode data fusion | |
| CN103268519A (en) | Short-term load forecasting method and device for power system based on improved Lyapunov index | |
| CN112883522A (en) | Micro-grid dynamic equivalent modeling method based on GRU (generalized regression Unit) recurrent neural network | |
| CN115469259A (en) | RBF neural network-based CT error state online quantitative evaluation method and device | |
| CN115270887A (en) | Abnormity identification method and device | |
| CN118897171B (en) | Detection method, device, medium and system for partial discharge capability of switchgear | |
| CN112150304A (en) | Power grid running state track stability prejudging method and system and storage medium | |
| Zhang et al. | Fault location method based on SVM and similarity model matching | |
| CN115166618A (en) | An Error Evaluation Method of Current Transformer with Non-stationary Output | |
| CN108491931A (en) | A method of non-destructive testing precision is improved based on machine learning | |
| CN114638380A (en) | Cable parameter fault determination method and device for multi-type parameter network model | |
| CN105488335A (en) | Lyapunov exponent based power system load prediction method and apparatus | |
| Gjorgiev et al. | Simulation-driven deep learning for locating faulty insulators in a power line | |
| CN116540167A (en) | Current transformer fault monitoring method and system based on transformation ratio tester | |
| CN115754875B (en) | Voltage transformer error assessment method and device | |
| CN116306806A (en) | Fault diagnosis model determining method and device and nonvolatile storage medium | |
| CN113486580A (en) | High-precision numerical modeling method, server and storage medium for in-service wind turbine generator | |
| CN104199744A (en) | Method and device for judging performance stability of applications of super computer | |
| CN115101149B (en) | Method for predicting total energy of microstructure of material | |
| Maria et al. | Improving manufacturing testing steps using artificial intelligence and machine learning algorithms trained on simulated waveforms | |
| CN105699043B (en) | A kind of wind tunnel sensors that improve measure stability and the method for precision | |
| CN115436741A (en) | Method, device, equipment and storage medium for determining health condition of user electric meter | |
| CN111695501A (en) | Equipment soft fault detection method based on operating system kernel calling data |
| 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 |