Smart meter error classification method and system, device, and storage medium
By collecting and decomposing field signals, establishing mathematical models and generating simulated disturbance signals, and constructing a multilayer sensor model, the problem of inaccurate dynamic error verification results of smart meters is solved, and high-precision disturbance type identification and error measurement are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-22
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies for dynamic error verification of smart meters have poor accuracy in error verification results, cannot distinguish the type of disturbance under actual operating conditions, and the simulated verification results differ greatly from the actual on-site operating conditions.
The system collects raw signals from the field, decomposes them into amplitude and frequency information of individual disturbance signals, establishes a mathematical model, generates simulated disturbance signals for verification, constructs a multilayer perceptron model for training and detection, and outputs the disturbance type and error.
It improves the accuracy of smart meter error detection, can accurately distinguish the type of disturbance and error, and the results are more consistent with the actual working conditions on site.
Smart Images

Figure CN114897006B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart meter error analysis technology, and in particular to a smart meter error classification method and system, device, and computer-readable storage medium. Background Technology
[0002] In recent years, with continuous economic development, my country's power grid has expanded significantly, power facilities have become increasingly sophisticated, and the number of electricity metering devices has increased rapidly. Among these, smart meters, as a crucial component of electricity metering devices, directly impact the interests of both supply and demand sides through their metering performance, and their safety performance directly affects the stable operation of the equipment. Therefore, accurate measurement of the metering error of smart meters is of paramount importance. However, smart meters that pass calibration under steady-state load may not meet metering error requirements under dynamic load test signals and excitations, and some may even exhibit significant errors.
[0003] Current dynamic error verification of smart meters primarily relies on simulation. This involves constructing mathematical models of various disturbances and exploring the errors generated by the smart meter under these conditions. However, without using actual smart meters, the constructed mathematical models struggle to fully simulate the unit response when the input current or power signal changes rapidly. Consequently, the simulation verification results differ significantly from actual field conditions. Furthermore, while random signals are used for verification, they still differ considerably from real-world conditions. Actual field conditions are far more complex and involve numerous uncertainties, leading to poor accuracy in laboratory measurements of smart meter dynamic errors. Therefore, existing methods for dynamic error verification of smart meters lack consideration of actual field conditions, resulting in inaccurate error verification results and an inability to distinguish the types of disturbances present in real-world conditions. Summary of the Invention
[0004] This invention provides a method, system, device, and storage medium for classifying errors in smart meters, in order to solve the technical problems of poor accuracy of error verification results and inability to distinguish the type of disturbance under actual operating conditions in existing methods for dynamic error verification of smart meters.
[0005] According to one aspect of the present invention, a method for classifying errors in smart meters is provided, comprising the following:
[0006] The raw signals of the field working conditions are collected, and the amplitude and frequency information of each individual disturbance signal is obtained after decomposing the raw signals. The waveform data matrix of the raw signals is then exported.
[0007] Mathematical models for each individual disturbance signal are established based on the amplitude-frequency information of each individual disturbance signal.
[0008] Based on the mathematical model of each individual disturbance signal, a simulated disturbance signal is generated, and the generated simulated disturbance signal is used to calibrate the smart meter to obtain the error data of the smart meter.
[0009] The error data of the smart meter and the disturbance parameters of the simulated disturbance signal are respectively amplified into the waveform data matrix to obtain the dataset matrix of the simulated disturbance signal. The dataset matrix is then labeled, and the label content includes the disturbance type of the simulated disturbance signal and the error data of the smart meter.
[0010] Construct a multilayer perceptron model and train the multilayer perceptron model using a labeled dataset matrix;
[0011] The trained multilayer 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.
[0012] Furthermore, the single disturbance signal includes at least one of voltage swell, voltage droop, voltage interruption, voltage flicker, harmonics, and intermittent waves.
[0013] Furthermore, the disturbance types of the simulated disturbance signal include single disturbance signals and composite disturbance signals. Among them, composite disturbance signals include the simultaneous presence of harmonics and intermittent waves, the simultaneous presence of harmonics and flicker, the simultaneous presence of harmonics and voltage swells, the simultaneous presence of harmonics and voltage sags, and the simultaneous presence of harmonics and voltage interruptions.
[0014] Furthermore, the loss function used in the multilayer perceptron model is obtained through weighted optimization of multiple loss functions:
[0015]
[0016] in, This represents the optimized loss function. α represents any one of the four loss functions: Focal Loss, KLDivergence, Hinge Loss, and Cross Entropy. i This represents the weighting parameters of the i-th loss function.
[0017] Furthermore, the weighting parameter α i The solution process is as follows:
[0018] The softmax function is used to convert the output values of multi-class classification into a probability function p. i , Among them, Z i Let C represent the output value of the i-th node, where C is the node that outputs the value.
[0019] Random values u are obtained by sampling from a uniform distribution.i The transformation parameter g is obtained after transformation. i , where u i =Uniform(0,1), g i =-log(-log(u) i ));
[0020] Introducing hyperparameter τ to control weighting parameter α i The smoothness is calculated using the following formula:
[0021] Furthermore, the disturbance parameters of the simulated disturbance signal include harmonic amplitude, intermittent wave amplitude, harmonic frequency, intermittent wave frequency, voltage flicker amplitude, voltage flicker frequency, waiting time of voltage swell / sag / interruption, sudden change time of voltage swell / sag / interruption, hold time of voltage swell / sag / interruption, and amplitude of voltage swell / sag / interruption.
[0022] Furthermore, the waveform data matrix has 28*28 pixels. Ten smart meter error data and 18 disturbance parameters are amplified into the waveform data matrix as separate columns. The remaining pixels are padded with zeros to obtain a 30*30 dataset matrix.
[0023] In addition, another embodiment of the present invention provides a smart meter error classification system, comprising:
[0024] The signal decomposition module is used to acquire the raw signals of the field conditions, decompose the raw signals to obtain the amplitude and frequency information of each individual disturbance signal, and export the waveform data matrix of the raw signals.
[0025] The modeling module is used to establish mathematical models of each individual disturbance signal based on the amplitude-frequency information of each individual disturbance signal.
[0026] The meter error analysis module is used to generate simulated disturbance signals based on mathematical models of each individual disturbance signal, and to use the generated simulated disturbance signals to verify the smart meter and obtain the error data of the smart meter.
[0027] The dataset construction module is used to amplify the error data of the smart meter and the disturbance parameters of the analog disturbance signal into the waveform data matrix as separate columns to obtain the dataset matrix of the analog disturbance signal. The dataset matrix is then labeled with the disturbance type of the analog disturbance signal and the error data of the smart meter.
[0028] The model training module is used to construct a multilayer perceptron model and train the multilayer perceptron model using a labeled dataset matrix.
[0029] The detection and analysis module is used to detect the signal to be detected using a trained multilayer perceptron model, and outputs the disturbance type of the signal to be detected and the corresponding error generated by the smart meter.
[0030] In addition, another embodiment of the present invention provides an apparatus including a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the method described above by calling the computer program stored in the memory.
[0031] In addition, another embodiment of the present invention provides a computer-readable storage medium for storing a computer program suitable for classifying errors in smart meters, the computer program executing the steps of the method described above when run on a computer.
[0032] The present invention has the following effects:
[0033] The smart meter error classification method of this invention first decomposes the raw signals of the field operating conditions to obtain the amplitude-frequency information of each individual disturbance signal, and establishes a corresponding mathematical model. Then, based on the mathematical models of each individual disturbance signal, a simulated disturbance signal is generated to calibrate the smart meter, thereby obtaining dynamic error data generated by the smart meter under different simulated disturbance signals. On the one hand, the calibration uses a real meter, which can respond quickly to the simulated disturbance signal, and the error calibration results are more consistent with the actual field operating conditions. On the other hand, the simulated disturbance signal used for calibration is generated based on the individual disturbance signals obtained after decomposing the raw signals of the field operating conditions, which is more in line with the actual operating conditions, and the error calibration results of the smart meter are highly accurate. Furthermore, the error data of the smart meter, the disturbance parameters of the simulated disturbance signal, and the waveform data matrix of the raw signal are combined to construct a dataset matrix to train the classification model, realizing data augmentation and improving the classification accuracy of the classification model. It can accurately distinguish the disturbance type of the power grid signal to be detected and accurately measure the error generated by the smart meter under different disturbance types.
[0034] In addition, the smart meter error classification system of the present invention also has the above-mentioned advantages.
[0035] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the figures. Attached Figure Description
[0036] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:
[0037] Figure 1This is a flowchart illustrating the error classification method for smart meters according to a preferred embodiment of the present invention.
[0038] Figure 2 This is a schematic diagram of the module structure of a smart meter error classification system according to another embodiment of the present invention. Detailed Implementation
[0039] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, the present invention can be implemented in many different ways as defined and covered below.
[0040] like Figure 1 As shown, a preferred embodiment of the present invention provides a smart meter error classification method, including the following:
[0041] Step S1: Collect the raw signals of the field conditions, decompose the raw signals to obtain the amplitude and frequency information of each individual disturbance signal, and export the waveform data matrix of the raw signals.
[0042] Step S2: Establish a mathematical model for each individual disturbance signal based on the amplitude-frequency information of each individual disturbance signal;
[0043] Step S3: Generate simulated disturbance signals based on the mathematical models of each individual disturbance signal, and use the generated simulated disturbance signals to calibrate the smart meter to obtain the error data of the smart meter;
[0044] Step S4: The error data of the smart meter and the disturbance parameters of the analog disturbance signal are respectively amplified into the waveform data matrix to obtain the dataset matrix of the analog disturbance signal. The dataset matrix is then labeled, and the label content includes the disturbance type of the analog disturbance signal and the error data of the smart meter.
[0045] Step S5: Construct a multilayer perceptron model and train the multilayer perceptron model using a labeled dataset matrix;
[0046] Step S6: Use the trained multilayer 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.
[0047] As can be understood, the smart meter error classification method in this embodiment first decomposes the raw signals from the field operating conditions to obtain the amplitude-frequency information of each individual disturbance signal, and establishes a corresponding mathematical model. Then, based on the mathematical models of each individual disturbance signal, a simulated disturbance signal is generated to calibrate the smart meter, thereby obtaining dynamic error data generated by the smart meter under different simulated disturbance signals. On the one hand, using a real meter for calibration allows the smart meter to respond quickly to simulated disturbance signals, making the error calibration results more consistent with actual field operating conditions. On the other hand, the simulated disturbance signals used for calibration are generated based on the individual disturbance signals obtained after decomposing the raw signals from the field operating conditions, which is more in line with actual operating conditions, resulting in high accuracy of the smart meter error calibration results. Furthermore, combining the error data of the smart meter, the disturbance parameters of the simulated disturbance signals, and the waveform data matrix of the raw signals to construct a dataset matrix for training the classification model achieves data augmentation, improves the classification accuracy of the classification model, and can accurately distinguish the disturbance type of the power grid signal to be detected and accurately measure the corresponding error generated by the smart meter under different disturbance types.
[0048] It is understood that in step S1, an NI RM-26999 power measurement regulator can be connected to a PXIe-6356 data acquisition module to acquire raw signals from the field conditions at a sampling rate of 10kHz. The RM-26999 is powered by a 24V DC power supply, and the fundamental frequency is 50Hz. Then, the acquired raw signals are imported into Matlab. Through programming, a Discrete Fourier Transform or Fast Fourier Transform is used to decompose the raw signals, thereby obtaining the amplitude and frequency information of the normal signal and each individual disturbance signal. Waveform graphs can also be generated and the waveform data matrix exported. The pixel size of the waveform data matrix is 28*28.
[0049] It is understood that in step S2, multiple individual disturbance signals can be obtained based on the decomposition in step S1. These individual disturbance signals include at least one of voltage swell, voltage drop, voltage interruption, voltage flicker, harmonics, and intermittent waves. Furthermore, the mathematical model established based on the amplitude-frequency information of each individual disturbance signal is as follows:
[0050] Voltage spurt / sag / interruption: x1(t)=(1+a0(b0(t-t1)-b0(t-t2)))cos(ω0t);
[0051] Harmonics / Intermittent Waves:
[0052] Voltage flicker: x3(t)=(1+a1cos(b1ω3t))cos(ω4t);
[0053] Where a, b, t, and ω are signal parameters, representing amplitude, time, and phase angle, respectively.
[0054] It is understood that in step S3, considering that the error classification of smart meters is mainly caused by composite disturbances at the power grid end, and that common composite disturbances include five cases: simultaneous existence of harmonics and intermittent waves, simultaneous existence of harmonics and flicker, simultaneous existence of harmonics and voltage spurs, simultaneous existence of harmonics and voltage sags, and simultaneous existence of harmonics and voltage interruptions, a power quality analyzer HL-610S is used to randomly generate simulated disturbance signals based on mathematical models of each single disturbance signal. The disturbance types of the simulated disturbance signals include the aforementioned six single disturbances and five composite disturbances. The power quality analyzer is connected to the smart meter, the active pulse constant of the meter being calibrated is set to 1200, the number of calibration cycles is set to 10, the frequency division coefficient is set to 10, and the number of measurements is set to 10. The power quality analyzer is used to measure the error data generated by the smart meter under different simulated disturbance signal inputs.
[0055] It can be understood that in step S4, the 10 smart meter error data points and 18 disturbance parameters are each amplified into a 28*28 waveform data matrix, and the remaining pixels are padded with zeros to obtain a 30*30 dataset matrix. The disturbance parameters of the simulated disturbance signal include harmonic amplitude, intermittent wave amplitude, harmonic frequency, intermittent wave frequency, voltage flicker amplitude, voltage flicker frequency, voltage rise / fall / interruption waiting time, voltage rise / fall / interruption sudden change time, voltage rise / fall / interruption hold time, and voltage rise / fall / interruption amplitude. Furthermore, these disturbance parameters are the input parameters of the power quality analyzer. Then, the dataset matrix is labeled, with the label content including the disturbance type of the simulated disturbance signal and the smart meter error data.
[0056] It can be understood that in step S5, the multilayer perceptron model includes an input layer, two hidden layers, and an output layer. The input layer is a dataset matrix, and the output layer contains the perturbation type and the smart meter's error data, i.e., classification labels. Each hidden layer consists of 16 fully connected neurons, using ReLU as the activation function, and the loss function is obtained through weighted optimization of multiple loss functions.
[0057]
[0058] in, This represents the optimized loss function. α represents any one of the four loss functions: Focal Loss, KLDivergence, Hinge Loss, and Cross Entropy. i This represents the weighting parameters of the i-th loss function.
[0059] It is understood that the multilayer perceptron model improves the model's versatility and achieves data optimization by using multiple loss functions for weighted optimization, compared to existing classification models that use a single loss function.
[0060] In step S5, the Gumbel-softmax technique is used to optimize the loss function, that is, to solve for the weighted parameters α. i The solution process is as follows:
[0061] The softmax function is used to convert the output values of multi-class classification into a probability function p. i , Among them, Z i Let C represent the output value of the i-th node, where C is the node that outputs the value.
[0062] Random values u are obtained by sampling from a uniform distribution. i The transformation parameter g is obtained after transformation. i , where u i =Uniform(0,1), g i =-log(-log(u) i ));
[0063] Introducing hyperparameter τ to control weighting parameter α i The smoothness is calculated using the following formula:
[0064] It is understood that in step S6, after the above processing of the signal to be detected is performed, a dataset matrix is obtained. The obtained dataset matrix is input into the trained multilayer perceptron model, and the disturbance type of the power grid signal to be detected and the corresponding error generated by the smart meter are automatically output.
[0065] In addition, such as Figure 2 As shown, another embodiment of the present invention also provides a smart meter error classification system, preferably employing the method of the above embodiment, the system comprising:
[0066] The signal decomposition module is used to acquire the raw signals of the field conditions, decompose the raw signals to obtain the amplitude and frequency information of each individual disturbance signal, and export the waveform data matrix of the raw signals.
[0067] The modeling module is used to establish mathematical models of each individual disturbance signal based on the amplitude-frequency information of each individual disturbance signal.
[0068] The meter error analysis module is used to generate simulated disturbance signals based on mathematical models of each individual disturbance signal, and to use the generated simulated disturbance signals to verify the smart meter and obtain the error data of the smart meter.
[0069] The dataset construction module is used to amplify the error data of the smart meter and the disturbance parameters of the analog disturbance signal into the waveform data matrix as separate columns to obtain the dataset matrix of the analog disturbance signal. The dataset matrix is then labeled with the disturbance type of the analog disturbance signal and the error data of the smart meter.
[0070] The model training module is used to construct a multilayer perceptron model and train the multilayer perceptron model using a labeled dataset matrix.
[0071] The detection and analysis module is used to detect the signal to be detected using a trained multilayer perceptron model, and outputs the disturbance type of the signal to be detected and the corresponding error generated by the smart meter.
[0072] As can be understood, the smart meter error classification system in this embodiment first decomposes the raw signals from the field operating conditions to obtain the amplitude-frequency information of each individual disturbance signal, and establishes a corresponding mathematical model. Then, based on the mathematical models of each individual disturbance signal, it generates simulated disturbance signals to calibrate the smart meter, thereby obtaining dynamic error data generated by the smart meter under different simulated disturbance signals. On the one hand, it uses real meters for calibration, allowing the smart meter to respond quickly to simulated disturbance signals, and the error calibration results are more consistent with the actual field operating conditions. On the other hand, the simulated disturbance signals used for calibration are generated based on the individual disturbance signals obtained after decomposing the raw signals from the field operating conditions, which is more in line with the actual operating conditions, resulting in high accuracy of the smart meter error calibration results. Furthermore, by combining the error data of the smart meter, the disturbance parameters of the simulated disturbance signals, and the waveform data matrix of the raw signals to construct a dataset matrix for training the classification model, data augmentation is achieved, improving the classification accuracy of the classification model. This allows for high-precision identification of the disturbance type of the power grid signal to be detected and accurate measurement of the corresponding error generated by the smart meter under different disturbance types.
[0073] In addition, another embodiment of the present invention provides an apparatus including a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the method described above by calling the computer program stored in the memory.
[0074] In addition, another embodiment of the present invention provides a computer-readable storage medium for storing a computer program suitable for classifying errors in smart meters, the computer program executing the steps of the method described above when run on a computer.
[0075] Common computer-readable storage media include: floppy disks, flexible disks, hard disks, magnetic tapes, any other magnetic media, CD-ROMs, any other optical media, punch cards, paper tape, any other physical media with perforated patterns, 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 chips or cartridges, or any other media readable by a computer. Instructions may further be transmitted or received by a transmission medium. The term transmission medium can include any tangible or intangible medium used to store, encode, or carry instructions for machine execution, and includes digital or analog communication signals or intangible media that facilitate communication of such instructions. Transmission media include coaxial cables, copper wires, and optical fibers, which contain conductors for transmitting a bus of computer data signals.
[0076] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for error classification of a smart meter, the method comprising: The method comprises the following steps: Collecting original signals of field conditions, decomposing the original signals to obtain normal signals and amplitude-frequency information of each single disturbance signal, and deriving waveform data matrix of the original signals; Based on the amplitude-frequency information of each single disturbance signal, a mathematical model of each single disturbance signal is established, wherein the single disturbance signal includes voltage surge, voltage sag, voltage interruption, voltage flicker, harmonic and intermittent wave; Based on the mathematical model of each single disturbance signal, a simulated disturbance signal is generated, and the smart meter is calibrated by using the generated simulated disturbance signal to obtain error data of the smart meter, wherein the disturbance types of the simulated disturbance signal include single disturbance signal and composite disturbance signal, and the composite disturbance signal includes the simultaneous existence of harmonic and intermittent wave, the simultaneous existence of harmonic and flicker, the simultaneous existence of harmonic and voltage surge, the simultaneous existence of harmonic and voltage sag, and the simultaneous existence of harmonic and voltage interruption; The error data of the smart meter and the disturbance parameters of the simulated disturbance signal are respectively expanded as a column in the waveform data matrix to obtain a data set matrix of the simulated disturbance signal, and the data set matrix is labeled, and the label content includes the disturbance type of the simulated disturbance signal and the error data of the smart meter; wherein the disturbance parameters of the simulated disturbance signal include harmonic amplitude, intermittent wave amplitude, harmonic frequency, intermittent wave frequency, voltage flicker amplitude, voltage flicker frequency, voltage surge / sag / interruption waiting time, voltage surge / sag / interruption sudden change time, voltage surge / sag / interruption holding time, and voltage surge / sag / interruption amplitude; A multilayer perceptron model is constructed, and the multilayer perceptron model is trained by using the data set matrix with labels; The trained multilayer perceptron model is used to detect the to-be-detected signal, and the disturbance type of the to-be-detected signal and the corresponding error of the smart meter are output.
2. The smart meter error classification method of claim 1, wherein, The loss function used by the multilayer perceptron model is obtained by weighted optimization of multiple loss functions: wherein, represents the optimized loss function, represents any one of Focal Loss, KL Divergence, Hinge Loss and Cross Entropy, a i represents the weighting parameter of the i-th loss function.
3. The smart meter error classification method of claim 2, wherein, The weighting parameter a i The solving process is as follows: The output value of the multi-classification is converted into a probability function p by using a Softmax function i , wherein, Z i represents the output value of the i-th node, and C is the output node Sampling a random value u from a uniform distribution i Transforming to get a transformed parameter g i where u i = Uniform(0,1), g i = -log(-log(u i )) The hyper-parameter τ is introduced to control the smoothness of the weighting parameter α, and the calculation formula is: i 4. The smart meter error classification method of claim 1, wherein, The pixels of the waveform data matrix are 28*28, 10 smart meter error data and 18 disturbance parameters are respectively expanded as a column in the waveform data matrix, and the remaining pixels are zero-padded to obtain a 30*30 data set matrix.
5. An intelligent meter error classification system employing the intelligent meter error classification method according to any one of claims 1 to 4, characterized by The method comprises the following steps: A signal decomposition module is used to collect original signals of field conditions, and decompose the original signals to obtain amplitude-frequency information of each single disturbance signal, and derive waveform data matrix of the original signals; A modeling module is used to establish a mathematical model of each single disturbance signal based on the amplitude-frequency information of each single disturbance signal; An electric meter error analysis module is used to generate a simulated disturbance signal based on the mathematical model of each single disturbance signal, and calibrate the smart meter by using the generated simulated disturbance signal to obtain error data of the smart meter; A data set construction module is used to expand the error data of the smart meter and the disturbance parameters of the simulated disturbance signal as a column in the waveform data matrix to obtain a data set matrix of the simulated disturbance signal, and 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. A model training module is configured to construct a multilayer perceptron model and train the multilayer perceptron model by using a labeled data set matrix. A detection analysis module is configured to detect a to-be-detected signal by using the trained multilayer perceptron model and output a disturbance type of the to-be-detected signal and an error generated by a smart meter.
6. An apparatus, comprising: The computer program is stored in the memory and is configured to be executed by the processor to perform the steps of the method according to any one of claims 1-4.
7. A computer readable storage medium storing a computer program adapted for error classification of smart meters, characterized in that, The computer program is stored in the memory and is configured to be executed by the processor to perform the steps of the method according to any one of claims 1-4.
Citation Information
Patent Citations
Method for generating traceable random waveform analog power signals
CN106405464A
A power quality disturbance classification method
CN109359693A