CN117609704A - Electric metering error analysis device of intelligent ammeter based on neural network model - Google Patents

Electric metering error analysis device of intelligent ammeter based on neural network model Download PDF

Info

Publication number
CN117609704A
CN117609704A CN202410089116.0A CN202410089116A CN117609704A CN 117609704 A CN117609704 A CN 117609704A CN 202410089116 A CN202410089116 A CN 202410089116A CN 117609704 A CN117609704 A CN 117609704A
Authority
CN
China
Prior art keywords
electric
window
meter
interference signal
error
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.)
Granted
Application number
CN202410089116.0A
Other languages
Chinese (zh)
Other versions
CN117609704B (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.)
Qingdao High Tech Communication Co ltd
Original Assignee
Qingdao High Tech Communication 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 Qingdao High Tech Communication Co ltd filed Critical Qingdao High Tech Communication Co ltd
Priority to CN202410089116.0A priority Critical patent/CN117609704B/en
Priority claimed from CN202410089116.0A external-priority patent/CN117609704B/en
Publication of CN117609704A publication Critical patent/CN117609704A/en
Application granted granted Critical
Publication of CN117609704B publication Critical patent/CN117609704B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides an electric metering error analysis device of an intelligent ammeter based on a neural network model, which belongs to the technical field of intelligent ammeter errors and comprises a power line filter, a first standard electric meter, a coupling device, an intelligent ammeter to be tested, a decoupling device, a second standard electric meter and a load which are connected in sequence, wherein the power line filter is connected with a power input line; the decoupling device is opposite to the coupling device and is used for eliminating a coupling voltage waveform in the electric energy waveform; the second standard electric meter is used for electrically measuring the decoupled electric energy waveform to obtain a second electric measurement value; the load is power equipment which utilizes the electric energy waveform to do work; the intelligent ammeter error analysis system further comprises a control chip, wherein an error analysis model training module is arranged in the control chip, and an error analysis model can be obtained and used for analyzing errors of the intelligent ammeter according to an electric energy waveform input by the intelligent ammeter.

Description

Electric metering error analysis device of intelligent ammeter based on neural network model
Technical Field
The invention belongs to the technical field of intelligent ammeter errors, and particularly relates to an electric metering error analysis device of an intelligent ammeter based on a neural network model.
Background
Intelligent electric energy meters are widely used in power systems as one of the key devices of smart grids. The intelligent ammeter can realize functions such as remote meter reading, power control and electric quantity metering. However, in practical use, the current smart meter still faces some technical problems to be solved.
The existing intelligent ammeter generally adopts an electronic metering chip as a metering element, and the precision of the element in the aspects of signal detection and electric metering calculation is higher, but some problems exist:
1) The sensor is sensitive to input signals and is easy to be interfered by various noises, so that metering errors are caused;
2) The signal processing capability and the anti-interference capability are weak, and various noises in the power grid environment are difficult to adapt;
3) The electronic metering chips of different brands and models have different performances and show larger individual errors.
These problems lead to the fact that the existing intelligent electric meter is difficult to ensure long-term stable metering accuracy, and electric quantity readings have large random fluctuation. When the input signal contains stronger interference, the metering error of the ammeter can be obviously increased, and the accuracy of electric energy metering is seriously affected.
The Chinese patent with publication number CN202311495362.8 discloses an electric energy metering method and system based on historical data analysis, and relates to the method and system for inputting the reading curves of the same group of electric energy meters together with a temperature background into an error recognition model which is trained on the basis of historical data in advance; and replacing the identified abrupt error point by using an adaptive curvature line to correct the abrupt error, and completing electric energy metering of the electric energy meter in the alpine region based on the corrected electric quantity data. The above patent only considers the data collected by the electric energy meter and the temperature as historical data, but does not consider various interferences in the electric energy signal, because in the using process of the electric energy meter, the input electric energy waveform is often not a standard sinusoidal curve, but has a large amount of interferences, if the influence of the interferences is not considered, the robustness of the electric metering error model obtained by training is poor, so that the accuracy of error analysis on electric metering of the intelligent electric meter is influenced.
Disclosure of Invention
In view of the above, the invention provides an electric metering error analysis device of a smart electric meter based on a neural network model, which can solve the technical problems that in the process of training an electric metering error model of the electric meter in the prior art, only data and temperature acquired by the electric meter are considered as historical data, but various interferences in electric energy signals are not considered, and because in the use process of the electric meter, an input electric energy waveform is often not a standard sinusoidal curve but has a large amount of interferences, if the influence of the interferences is not considered, the robustness of the electric metering error model obtained by training is poor, and the accuracy of the electric metering error analysis of the smart electric meter is influenced.
The invention is realized in the following way:
the invention provides an electric metering error analysis device of a smart meter based on a neural network model, which is characterized by comprising a power line filter, a first standard electric meter, a coupling device, a smart meter to be tested, a decoupling device, a second standard electric meter and a load which are sequentially connected, wherein the power line filter is connected with a power input line and is used for acquiring a power waveform of the power input line and shaping and filtering the power waveform of the power line, and the first standard electric meter is used for metering the filtered power waveform to obtain a first electric metering value; the coupling device is used for generating an interference signal voltage waveform and coupling the voltage waveform of the filtered electric energy waveform, and the intelligent ammeter to be measured measures the coupled electric energy waveform to obtain an electric measurement value to be measured; the decoupling device is opposite to the coupling device and is used for eliminating a coupling voltage waveform in the electric energy waveform; the second standard electric meter is used for electrically measuring the decoupled electric energy waveform to obtain a second electric measurement value; the load is an electric device which uses the electric energy waveform to do work.
The system comprises a first standard electric meter, a coupling device, a decoupling device, a second standard electric meter, a first standard electric meter, a second standard electric meter, a first decoupling device, a second decoupling device, a first standard electric meter, a second standard electric meter, a decoupling device and a second standard electric meter, wherein the control chip is internally provided with a coupling control module, the decoupling control module and a smart electric meter error analysis model training module, and the coupling control module is used for generating an interference signal and outputting the interference signal to the coupling device for generating an interference signal voltage waveform; the decoupling control module is used for outputting the interference signal to a decoupling device for decoupling a coupling voltage waveform in the electric energy waveform; the intelligent ammeter error analysis model training module is used for carrying out error analysis according to the interference signal, the first electric measurement value, the second electric measurement value and the electric measurement value to be measured, and training and optimizing a neural network model for calculating the error of the electric measurement value to be measured according to the interference signal to serve as an error analysis model; the error analysis model is used for analyzing the error of the intelligent ammeter according to the electric energy waveform input by the intelligent ammeter.
On the basis of the technical scheme, the electric metering error analysis device of the intelligent ammeter based on the neural network model can be further improved as follows:
the intelligent ammeter error analysis model training module is used for executing the following steps:
s10, adopting a clustering algorithm to formulate the length of a time window as a first length;
s20, acquiring window characteristics of the interference signals by using a time window;
s30, according to each window characteristic, acquiring a first electric measurement value, a second electric measurement value and an electric measurement value to be measured between the starting moment and the ending moment of the corresponding window;
s40, calculating the error of the electric measurement value to be measured, and taking the error as the error corresponding to the window characteristic;
s50, a training data set is established, wherein the training data set comprises window characteristics and errors corresponding to each time window;
s60, building a neural network model, and training by using the training data set to obtain an error analysis model;
s70, randomly changing the window length to be a second length, repeating the steps S20-S40, acquiring window characteristics and errors corresponding to a plurality of windows with the second window length as a verification set, and performing verification optimization on the error analysis model;
and S80, repeating the step S70 for a plurality of times, and storing the finally obtained error analysis model after verification and optimization.
Further, the step of adopting the self-supervised learning clustering algorithm to formulate the time window length as the first length specifically includes:
collecting a large amount of load curve data in an actual running power grid, and preprocessing, including denoising and regularization, to obtain a cleaned data set;
setting a plurality of candidate time window lengths;
clustering the cleaned data set by using a K-means clustering algorithm, and counting the window length with the optimal clustering number in a clustering result according to each candidate window length;
comparing the cluster numbers of different candidate window lengths, and selecting the window length with the largest cluster number as the final window length of the model;
using a gating convolutional neural network model, inputting adjacent window data, predicting the relation between windows, and adjusting the gating convolutional neural network model to ensure that the clustering effect is optimal;
repeating the steps until the number of clusters is not changed, selecting the window length at the moment as the final length, and recording the final length as the first length.
Further, the step of acquiring the window feature of the interference signal by using a time window specifically includes:
collecting interference signal waveforms in a window every other window length;
preprocessing the acquired interference signal waveform to obtain a clean signal;
extracting time domain statistical characteristics including mean value and variance of signal amplitude;
extracting frequency domain characteristics and acquiring frequency spectrum information;
extracting time-frequency characteristics, and using a wavelet transformation method;
and carrying out normalization processing on the time domain statistical features, the frequency domain features and the time frequency features to obtain 0-1 normalized features serving as window features.
Further, the step of calculating the error of the measured electrical value as the error corresponding to the window feature specifically includes:
taking the first standard electric meter reading as a reference reading;
calculating the reading deviation of the second standard electric meter relative to the first standard meter;
calculating the reading deviation of the to-be-measured meter relative to the first standard meter;
converting the second standard meter reading deviation into a rated error;
subtracting the rated error from the reading deviation of the to-be-measured meter to obtain an actually measured error.
Further, the power line filter is a low pass filter.
Further, the coupling device adopts a power line carrier coupling device, and comprises:
the carrier transmitter is used for receiving the interference signal output by the control chip and converting the interference signal into an analog interference signal in a carrier form;
and the power line coupling module comprises a coupling inductor and is used for coupling the analog interference signal output by the carrier transmitter to a power line so as to realize interference on the electric energy waveform.
Further, the output frequency range of the carrier transmitter is 80% of the bandwidth of the smart meter to be tested, and the output voltage is adjusted to be 30% of the input voltage of the smart meter to be tested.
Further, the decoupling device adopts a power line carrier coupling structure, and comprises:
the carrier receiver is used for receiving signals on the power line through the coupling inductor and extracting carrier interference components in the signals;
the interference separation filter is used for filtering the extracted carrier interference signal and removing the carrier interference signal from the electric energy waveform;
wherein the carrier receiver of the decoupling device is tuned to the same center frequency as the carrier transmitter.
Further, the specific way for the coupling control module in the control chip to generate the interference signal is as follows:
according to the bandwidth range of the intelligent electric meter to be tested, determining that the generated interference signal frequency range is 80% of the bandwidth of the electric meter to be tested;
setting the frequency of an interference signal by adopting a direct digital frequency synthesis technology and adopting a random digital signal generator;
setting the amplitude range of the interference signal output by the digital signal generator as 30% of the input voltage amplitude of the ammeter to be tested;
the digital signal generator is controlled to periodically output an interference signal according to the window time length determined in step S20 to interfere with the power waveform.
Compared with the prior art, the intelligent ammeter electricity metering error analysis device based on the neural network model has the beneficial effects that:
1. the metering error condition of the intelligent ammeter under different intensity interference can be accurately detected, and the anti-interference capability of the ammeter is evaluated;
2. the neural network error model is established, so that errors under the specified interference condition can be accurately detected and analyzed, and the performance of the ammeter is guided to be improved;
3. the model can adapt to different kinds of signal characteristics through training of windows with various lengths, and detection robustness is improved.
The method solves the technical problems that in the prior art, only data and temperature acquired by an electric energy meter are taken as historical data in the electric metering error model training process of the electric meter, but various interferences in electric energy signals are not considered, and because in the electric energy meter use process, an input electric energy waveform is often not a standard sinusoidal curve but has a large amount of interferences, if the influence of the interferences is not considered, the electric metering error model obtained by training is poor in robustness and the accuracy of electric metering error analysis of the intelligent electric meter is influenced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a device according to the present invention;
fig. 2 is a flow chart of the method provided by the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
As shown in fig. 1, the structure diagram of an electric metering error analysis device of a smart meter based on a neural network model provided by the invention comprises a power line filter, a first standard electric meter, a coupling device, a smart meter to be tested, a decoupling device, a second standard electric meter and a load which are sequentially connected, wherein the power line filter is connected with a power input line and is used for acquiring a power waveform of the power input line and shaping and filtering the power waveform coming in and going out of the power line, and the first standard electric meter is used for metering the filtered power waveform to obtain a first electric metering value; the coupling device is used for generating an interference signal voltage waveform and coupling the voltage waveform of the filtered electric energy waveform, and the intelligent electric meter to be measured measures the coupled electric energy waveform to obtain an electric measurement value to be measured; the decoupling device is opposite to the coupling device and is used for eliminating the coupling voltage waveform in the electric energy waveform; the second standard electric meter is used for electrically measuring the decoupled electric energy waveform to obtain a second electric measurement value; the load is power equipment which utilizes the electric energy waveform to do work; the system comprises a first standard electric meter, a coupling device, a smart electric meter to be tested, a decoupling device and a second standard electric meter, and is characterized by further comprising a control chip, wherein the control chip is electrically connected with the first standard electric meter, the coupling device, the smart electric meter to be tested, the decoupling device and the second standard electric meter; the decoupling control module is used for outputting an interference signal to the decoupling device and decoupling a coupling voltage waveform in the electric energy waveform; the intelligent ammeter error analysis model training module is used for carrying out error analysis according to the interference signal, the first electric measurement value, the second electric measurement value and the electric measurement value to be measured, and training and optimizing a neural network model for calculating the error of the electric measurement value to be measured according to the interference signal to be used as an error analysis model; the error analysis model is used for analyzing the error of the intelligent ammeter according to the electric energy waveform input by the intelligent ammeter.
Wherein, coupling device:
the coupling device adopts a power line carrier coupling device, which comprises:
(1) The carrier transmitter is used for receiving the digital interference signal output by the control chip and converting the digital interference signal into an analog interference signal in a carrier form;
(2) And the power line coupling module comprises a coupling inductor and couples an interference signal output by the carrier transmitter to a power line to realize interference on the electric energy waveform.
Preferably, the output frequency range of the carrier transmitter is 80% of the bandwidth of the smart meter to be measured, and the output voltage is adjusted to be 30% of the input voltage of the meter to be measured.
Decoupling means:
the decoupling device also adopts a power line carrier coupling structure, and the components of the decoupling device comprise:
(1) The carrier receiver receives signals on the power line through the coupling inductor and extracts carrier interference components in the signals;
(2) And the interference separation filter is used for filtering the extracted carrier interference signal and removing the carrier interference signal from the electric energy waveform.
The carrier receiver of the decoupling device is tuned to the same center frequency as the carrier transmitter to accurately acquire the interference component for removal.
Compared with a simple RC filter circuit, the carrier coupling mode can be used for adding and filtering interference with strong directivity, and the effect is improved. Other circuits or devices with similar decoupling functions may also be used by those skilled in the art to implement the decoupling means.
The generation mode of the interference signal is as follows:
1) According to the bandwidth range of the intelligent electric meter to be tested, determining the frequency range of the generated interference signal, and taking 80% of the bandwidth range of the intelligent electric meter to be tested as the frequency range of the interference signal;
2) The digital signal generator is designed to generate a random noise signal having a set frequency range and a set amplitude range. The digital signal generator adopts a direct digital frequency synthesis technology, and the frequency of an output signal can be accurately set by controlling a digital frequency control word;
3) Setting the output frequency range of the digital signal generator to be 80% of the bandwidth of the smart meter to be tested determined in the step 1), wherein the amplitude range is 30% of the input voltage amplitude of the smart meter to be tested;
4) Converting the digital random noise signal output by the digital signal generator into an analog random noise signal by using a high-speed DA converter as a final interference signal;
5) And controlling the output time sequence of the digital signal generator, and interfering the electric energy waveform in the window time by taking the window time length in the step S20 as a period.
Through the steps, the frequency range and the amplitude range of the interference signal can be accurately controlled, effective interference on the frequency in the bandwidth range of the intelligent ammeter to be tested is realized, and the anti-interference performance of the intelligent ammeter is detected.
In the above technical solution, the smart meter error analysis model training module is configured to execute the following steps:
s10, adopting a clustering algorithm to formulate the length of a time window as a first length;
s20, acquiring window characteristics of an interference signal by using a time window;
s30, acquiring a first electric measurement value, a second electric measurement value and an electric measurement value to be measured between the starting moment and the ending moment of the corresponding window according to the characteristics of each window;
s40, calculating an error of the electric measurement value to be measured, and taking the error as an error corresponding to the window characteristic;
s50, a training data set is established, wherein the training data set comprises window characteristics and errors corresponding to each time window;
s60, building a neural network model, and training by using a training data set to obtain an error analysis model;
s70, randomly changing the window length to be a second length, repeating the steps S20-S40, acquiring window characteristics and errors corresponding to a plurality of windows with the second window length as a verification set, and performing verification optimization on an error analysis model;
and S80, repeating the step S70 for a plurality of times, and storing the finally obtained error analysis model after verification and optimization.
The following is a description of specific embodiments of the invention:
specific embodiment of step S10:
step S10 adopts a self-supervision learning clustering algorithm to formulate the time window length, and can be realized by adopting the following technical scheme:
1) Collecting a large amount of load curve data in an actual running power grid, and preprocessing the data, including denoising, regularization and the like, to obtain a cleaned data set;
2) Setting a plurality of candidate time window lengths, such as 5min,15min,30min,60min and the like;
3) Clustering the data set by using a K-means clustering algorithm, and counting the window length with the optimal clustering number in the clustering result according to each candidate window length;
4) Comparing the optimal cluster numbers of different candidate window lengths, and selecting the window length with the largest cluster number as the final window length of the model;
5) The self-supervision contrast learning idea is adopted, a gating convolutional neural network model is used, adjacent window data is input, the relation (same/different) between windows is predicted, and the model is adjusted to optimize the clustering effect;
6) Repeating steps 3) -5) until the number of clusters is no longer changed, and selecting the window length at that time as the final window length.
According to the method, the distribution condition of the power grid load data is analyzed through clustering, the window length optimal for the data set is selected, and then self-supervision comparison learning is adopted for further optimization, so that the time window length can be effectively formulated according to the characteristics of the data, and the adaptability of the model is improved.
The selection of the window length directly influences the effect of the subsequent error model establishment, the automatic selection of the window length not only avoids the limitation of manual experience, but also enables the result to adapt to the data set to the greatest extent, and the method is a data-driven intelligent method.
Specific embodiment of step S20:
step S20 is used to acquire the interference signal characteristics in each time window as input characteristics for subsequent error model establishment. The specific implementation process is as follows:
1) According to the time window length determined in the step S10, collecting interference signal waveforms in a window every other window length;
2) Preprocessing the acquired interference signal waveform, including removing direct current components, filtering, denoising and the like, so as to obtain a clean interference signal;
3) Extracting time domain statistical characteristics including mean value, variance, maximum value, minimum value, peak-to-peak value and the like of signal amplitude values, and reflecting the overall distribution of the signals in a time domain;
4) Extracting frequency domain features, performing fast Fourier transform on the signals, acquiring spectrum information, and extracting frequency domain features such as a mean value, a variance, a dominant frequency and the like of a spectrum;
5) Extracting time-frequency characteristics, and acquiring comprehensive information of signals in a time-frequency domain by using methods such as wavelet transformation and the like as characteristics;
6) Normalizing the characteristics to obtain 0-1 normalized numerical characteristics in each time window;
7) Forming a final input feature vector, wherein the final input feature vector comprises time domain, frequency domain and time-frequency domain statistical features;
through the steps, the characteristics of the interference signals in the time domain, the frequency domain and the time-frequency domain can be comprehensively extracted, the signal characteristics can be accurately reflected, and information characteristic input is provided for subsequent modeling.
Specific embodiment of step S30:
step S30 is used for obtaining the electric meter reading corresponding to the time interval, and the specific implementation process is as follows:
1) Determining a time interval for acquiring the reading according to the window starting and ending moments extracted in the step S20;
2) Synchronously sampling the first standard electric meter, the second standard electric meter and the intelligent electric meter to be tested, and recording the metering reading at each sampling moment;
3) Filtering and smoothing the sampled readings to remove the influence of random errors;
4) Calculating effective electric energy in a time interval, and calculating interval electric energy increment according to the starting and ending time readings;
5) Respectively calculating effective electric energy readings of the first standard electric meter, the second standard electric meter and the to-be-measured meter in the time interval;
through the steps, the electric energy readings of the three corresponding time intervals can be accurately obtained, and a data basis is provided for the subsequent calculation errors.
Specific embodiment of step S40:
step S40 is used for calculating the measurement error, and the specific implementation process is as follows:
1) Taking the first standard electric meter reading obtained in the step S30 as a reference reading;
2) Calculating the reading deviation of the second standard electric meter relative to the first standard meter;
3) Calculating the reading deviation of the intelligent ammeter to be measured relative to the first standard meter;
4) Combining the reading deviation of the step 2) with the accuracy parameter, and converting the reading deviation into a rated error of a second standard instrument;
5) Taking the reading deviation of the step 3) as the actual measurement error of the ammeter to be measured;
6) Comparing the actual measurement error with the rated error, and analyzing the measurement accuracy level of the to-be-measured meter;
7) Repeating the steps 1) -6), and obtaining error results of all window time intervals;
through error comparison analysis, the metering precision and the anti-interference level of the intelligent ammeter to be measured can be quantitatively evaluated, and a target output label is provided for constructing an error model.
The specific implementation manner of step S50:
step S50 is used for building a training data set of a model, and its specific implementation manner is as follows:
1) Constructing an input feature matrix: constructing a feature matrix by using the interference signal feature vectors of all windows extracted in the step S20, wherein each row represents one sample, and each column represents one feature dimension;
2) Constructing a tag vector: taking the error corresponding to each window calculated in the step S40 as a label vector, and corresponding to the feature matrix;
3) Data set partitioning: the feature matrix and the tag vector are randomly divided into a training data set and a validation data set, for example, as per 8:2, dividing the proportion;
4) Preprocessing a data set: preprocessing the training data set, such as normalization, standardization and the like, so that the data distribution is suitable for model training;
5) Constructing a data loader: constructing a data loader by using a PyTorch and other deep learning frameworks, and preparing a training data set and a verification data set as tensors capable of being directly input into a model;
by the steps, starting from the original signal data, gradually constructing a standard data set which can be directly used for model training and verification, and providing data support for model training and evaluation;
the specific implementation manner of step S60:
step S60 is used for establishing an error prediction model, and its specific implementation manner is as follows:
1) And (3) model structural design: the method comprises the steps of adopting a fully connected network as a basic framework, and designing the number of network layers and the number of nodes according to the input and output characteristics;
2) Activation function selection: the network hidden layer adopts a ReLU activation function, and the output layer does not use the activation function;
3) And (3) loss function design: using the MSE loss function, and taking the mean square error between the predicted value and the true value as a loss;
4) And (3) selecting an optimization algorithm: performing parameter optimization by adopting adaptive optimization algorithms such as Adam and the like;
5) Model training: training by using the data set prepared in the step S50, training a plurality of epochs, and recording losses on the verification set;
6) Super-parameter adjustment: the super parameters such as the network layer number, the node number, the learning rate and the like are adjusted, and the combination with the minimum verification loss function is selected;
7) And (3) saving a model: the model after obtaining the optimal super-parameters and parameters is stored as a prediction model;
an initial error prediction model is established through designing a network structure, selecting an algorithm and parameter adjustment training, and a foundation is provided for subsequent model optimization;
the specific implementation manner of step S70:
step S70 is used for verifying and optimizing the model by changing the window length, and its specific implementation manner is as follows:
1) Window length change: randomly changing window length, for example, adjusting to 10min, 20min, etc.;
2) And (3) data extraction: repeating steps S20-S40, extracting features by using the new length window and calculating errors;
3) Model verification: predicting on the saved model by using the data with the new window length, and calculating a prediction error on the verification set;
4) Model optimization: adjusting the model structure and super parameters through the checking set prediction effect, retraining, and selecting the model parameters with the minimum error for storage;
5) And (5) repeating verification: iterating the steps 1) -4) for a plurality of times, and verifying the generalization capability of the model through different window lengths;
the robustness of the model is verified through window length change, and the model is optimized through a check set, so that the prediction precision of the model under various signal inputs is improved, and the adaptability of the model is enhanced;
the specific implementation manner of step S80:
step S80 is used for storing a final error analysis model, and its specific implementation manner is as follows:
1) Model evaluation: evaluating the predictive effect of the model over various window lengths;
2) And (3) selecting an optimal model: comprehensively comparing prediction errors under different window lengths, and selecting a model with the best comprehensive effect;
3) Model preservation: saving the parameters and the structure of the selected optimal model, including network layer number, node number, model parameter value and the like;
4) Deployment implementation: deploying the stored model into an actual system, and completing the transition from training to productization application;
5) Model updating: and continuously optimizing the model by adding data so as to adapt to more scenes and realize continuous improvement of the model.
The whole model development and application flow is completed by evaluating, selecting and storing the optimal model and deploying and applying the optimal model, and the intelligent ammeter metering error detection is supported by an accurate error analysis model.
The following is a specific embodiment of the smart meter error analysis model training module:
the specific implementation manner of step S10: in step S10, a clustering algorithm of self-supervised learning is employed to formulate a time window length. The specific idea is as follows:
1. collecting a load curve dataset
Represents the ith sample, where N is the number of samples, F is the characteristic dimension of each sample,/-)>Representation->Is a matrix of (a);
2. setting a set of candidate window lengths
In the method, in the process of the invention,for the number of candidate lengths>Representing an i-th candidate window length;
3. for each candidate window length
(1) Data is processedEqually spaced apart segments as windows
(2) Clustering using KMeans algorithm:
wherein the method comprises the steps ofIs a specific clustering result,/->The number of clusters, generally n=32, may be empirically set;
(3) Counting the most clusters in the clustering resultAs the best cluster number->;
4. Comparing differentLower->Select->Maximum->As a final window length;
5. self-supervised cluster optimization is performed using a gated convolutional network. The loss function is the contrast loss of adjacent windows:
;
wherein the method comprises the steps ofIs a gated convolutional network,/->Is a distance measure by adjusting +.>The loss function is minimized to optimize the clustering effect.
The specific implementation manner of step S20: in step S20, the interference signal features within each window are extracted. The idea is as follows:
1. definition of a sampled signalWindow length->
2. Segment sampling to obtain window signal
3. Pretreatment denoising to obtain
4. The following time domain statistics are extracted:
-average value:
-variance:
-extremum:
5. for signalsPerforming Fourier transform to extract frequency domain features such as main frequency and the like;
6. performing time-frequency analysis by using wavelet transformation and the like, and extracting time-frequency characteristics;
7. normalizing all features to form a final feature vectorRepresenting the final feature vector of the ith window.
The specific implementation manner of step S30: in step S30, meter readings are taken according to the window interval. The specific method comprises the following steps:
1. according to window time intervalsDetermining a reading interval;
2. synchronously sampling a standard ammeter and an ammeter to be tested, and obtaining readings in a window interval:
in the method, in the process of the invention,indicating the ammeter signal +.>Representing an ammeter signal; />Indicating the reading in the ith window of the standard ammeter; />Indicating the reading in the ith window of the meter.
The specific implementation manner of step S40: in step S40, a metering error of the meter under test is calculated. The calculation flow is as follows:
1. setting the first standard ammeter reading as the reference readingHere i is a subscript indicating the window interval;
2. second standard table reading bias:
3. the reading deviation of the to-be-measured meter:
-/>
and (3) for i to loop from 0 to the maximum interval, obtaining errors of all window intervals.
Step S50 establishes a training data set including window characteristics and errors corresponding to each time window.
The specific implementation manner of step S60: in step S60, a neural network model is constructed to perform error prediction. The method specifically comprises the following steps:
1) And (3) model structural design: the method comprises the steps of adopting a fully connected network as a basic framework, and designing the number of network layers and the number of nodes according to the input and output characteristics;
2) Activation function selection: the network hidden layer adopts a ReLU activation function, and the output layer does not use the activation function
3) And (3) loss function design: using the MSE loss function, and taking the mean square error between the predicted value and the true value as a loss;
4) And (3) selecting an optimization algorithm: performing parameter optimization by adopting adaptive optimization algorithms such as Adam and the like;
5) Model training: training by using the data set prepared in the step S50, training a plurality of epochs, and recording losses on the verification set;
6) Super-parameter adjustment: the super parameters such as the network layer number, the node number, the learning rate and the like are adjusted, and the combination with the minimum verification loss function is selected;
7) And (3) saving a model: and the model after the optimal super parameters and parameters are obtained is stored as a prediction model.
The specific implementation manner of step S70: in step S70, the model is verified by changing the window length. The method comprises the following specific steps:
1. changing window length to;
2. UsingExtracting characteristics and calculating errors, and constructing a new data set;
3. testing a new data set on the model obtained in the step S60, and calculating a mean square error loss function MSE;
4. if MSE is large, adjusting the model structure and retraining the super parameters;
5. repeating the above process using multiple methodsVerifying the model, and selecting the model with the best generalization effect;
and S80, repeating the step S70 for 10-200 times, and storing the finally obtained error analysis model after verification and optimization.
The invention mainly realizes the technical effect of improving the metering precision through the following points:
1. the controllable artificial interference signal is added, so that the influence of various noises on the signal under the actual condition can be accurately simulated, and the error detection is carried out on the control variable;
2. simultaneously, the reading of the standard ammeter is recorded so as to reflect the real electricity consumption more accurately and reduce the influence of fluctuation of the power grid;
3. the signal window characteristics are extracted and errors are calculated, so that the error can be more comprehensively estimated by replacing simple comparison reading;
4. the trained neural network model can learn the complex nonlinear relation between the signal characteristics and the errors and accurately predict the signals;
5. the adaptive optimization of window length and model parameters makes the model more robust to signal variations.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention.

Claims (10)

1. The utility model provides an electric metering error analysis device of smart electric meter based on neural network model, its characterized in that includes power line filter, first standard electric meter, coupling device, smart electric meter to be measured, decoupling device, second standard electric meter and load that connect gradually, wherein, power line filter connects the electric power input line, is used for obtaining the electric energy waveform of electric power input line and carries out plastic and filtering to the electric energy waveform that the power line came in and out, first standard electric meter is used for measuring the electric energy waveform after filtering, obtains first electric metering value; the coupling device is used for generating an interference signal voltage waveform and coupling the voltage waveform of the filtered electric energy waveform, and the intelligent ammeter to be measured measures the coupled electric energy waveform to obtain an electric measurement value to be measured; the decoupling device is opposite to the coupling device and is used for eliminating a coupling voltage waveform in the electric energy waveform; the second standard electric meter is used for electrically measuring the decoupled electric energy waveform to obtain a second electric measurement value; the load is power equipment which utilizes the electric energy waveform to do work; the intelligent ammeter further comprises a control chip for analyzing errors of the intelligent ammeter.
2. The electric metering error analysis device of the intelligent ammeter based on the neural network model according to claim 1, wherein the control chip is electrically connected with the first standard electric meter, the coupling device, the intelligent ammeter to be tested, the decoupling device and the second standard electric meter, a coupling control module, a decoupling control module and an intelligent ammeter error analysis model training module are arranged in the control chip, and the coupling control module is used for generating an interference signal and outputting the interference signal to the coupling device for generating an interference signal voltage waveform; the decoupling control module is used for outputting the interference signal to a decoupling device for decoupling a coupling voltage waveform in the electric energy waveform; the intelligent ammeter error analysis model training module is used for carrying out error analysis according to the interference signal, the first electric measurement value, the second electric measurement value and the electric measurement value to be measured, and training and optimizing a neural network model for calculating the error of the electric measurement value to be measured according to the interference signal to serve as an error analysis model; the error analysis model is used for analyzing the error of the intelligent ammeter according to the electric energy waveform input by the intelligent ammeter.
3. The device for analyzing electric metering errors of a smart meter based on a neural network model according to claim 2, wherein the smart meter error analysis model training module is configured to perform the following steps:
s10, adopting a clustering algorithm to formulate the length of a time window as a first length;
s20, acquiring window characteristics of the interference signals by using a time window;
s30, according to each window characteristic, acquiring a first electric measurement value, a second electric measurement value and an electric measurement value to be measured between the starting moment and the ending moment of the corresponding window;
s40, calculating the error of the electric measurement value to be measured, and taking the error as the error corresponding to the window characteristic;
s50, a training data set is established, wherein the training data set comprises window characteristics and errors corresponding to each time window;
s60, building a neural network model, and training by using the training data set to obtain an error analysis model;
s70, randomly changing the window length to be a second length, repeating the steps S20-S40, acquiring window characteristics and errors corresponding to a plurality of windows with the second window length as a verification set, and performing verification optimization on the error analysis model;
and S80, repeating the step S70 for a plurality of times, and storing the finally obtained error analysis model after verification and optimization.
4. The device for analyzing electric metering errors of intelligent ammeter based on neural network model according to claim 3, wherein the step of adopting self-supervised learning clustering algorithm to make the length of the time window be the first length comprises the following steps:
collecting a large amount of load curve data in an actual running power grid, and preprocessing, including denoising and regularization, to obtain a cleaned data set;
setting a plurality of candidate time window lengths;
clustering the cleaned data set by using a K-means clustering algorithm, and counting the window length with the optimal clustering number in a clustering result according to each candidate window length;
comparing the cluster numbers of different candidate window lengths, and selecting the window length with the largest cluster number as the final window length of the model;
using a gating convolutional neural network model, inputting adjacent window data, predicting the relation between windows, and adjusting the gating convolutional neural network model to ensure that the clustering effect is optimal;
repeating the steps until the number of clusters is not changed, selecting the window length at the moment as the final length, and recording the final length as the first length.
5. The device for analyzing electric metering error of intelligent ammeter based on neural network model according to claim 3, wherein the step of obtaining window characteristics of the interference signal by using time window specifically comprises:
collecting interference signal waveforms in a window every other window length;
preprocessing the acquired interference signal waveform to obtain a clean signal;
extracting time domain statistical characteristics including mean value and variance of signal amplitude;
extracting frequency domain characteristics and acquiring frequency spectrum information;
extracting time-frequency characteristics, and using a wavelet transformation method;
and carrying out normalization processing on the time domain statistical features, the frequency domain features and the time frequency features to obtain 0-1 normalized features serving as window features.
6. The electrical measurement error analysis device of a smart meter based on a neural network model according to claim 3, wherein the step of calculating the error of the electrical measurement value to be measured as the error corresponding to the window feature specifically comprises:
taking the first standard electric meter reading as a reference reading;
calculating the reading deviation of the second standard electric meter relative to the first standard meter;
calculating the reading deviation of the to-be-measured meter relative to the first standard meter;
converting the second standard meter reading deviation into a rated error;
subtracting the rated error from the reading deviation of the to-be-measured meter to obtain an actually measured error.
7. The device for analyzing electric metering errors of a smart meter based on a neural network model according to claim 6, wherein the power line filter is a low-pass filter.
8. The device for analyzing electric metering errors of a smart meter based on a neural network model according to claim 7, wherein the coupling device adopts a power line carrier coupling device, and comprises:
the carrier transmitter is used for receiving the interference signal output by the control chip and converting the interference signal into an analog interference signal in a carrier form;
the power line coupling module comprises a coupling inductor and is used for coupling an analog interference signal output by the carrier transmitter to a power line so as to realize interference on an electric energy waveform; the output frequency range of the carrier transmitter is 80% of the bandwidth of the intelligent electric meter to be tested, and the output voltage is adjusted to be 30% of the input voltage of the intelligent electric meter to be tested.
9. The device for analyzing electric metering errors of a smart meter based on a neural network model according to claim 8, wherein the decoupling device adopts a power line carrier coupling structure, and comprises:
the carrier receiver is used for receiving signals on the power line through the coupling inductor and extracting carrier interference components in the signals;
the interference separation filter is used for filtering the extracted carrier interference signal and removing the carrier interference signal from the electric energy waveform;
wherein the carrier receiver of the decoupling device is tuned to the same center frequency as the carrier transmitter.
10. The electric metering error analysis device of a smart meter based on a neural network model according to any one of claims 1 to 9, wherein the specific way for the coupling control module in the control chip to generate the interference signal is:
according to the bandwidth range of the intelligent electric meter to be tested, determining that the generated interference signal frequency range is 80% of the bandwidth of the electric meter to be tested;
setting the frequency of an interference signal by adopting a direct digital frequency synthesis technology and adopting a random digital signal generator;
setting the amplitude range of the interference signal output by the digital signal generator as 30% of the input voltage amplitude of the ammeter to be tested;
the digital signal generator is controlled to periodically output an interference signal according to the window time length determined in step S20 to interfere with the power waveform.
CN202410089116.0A 2024-01-23 Electric metering error analysis device of intelligent ammeter based on neural network model Active CN117609704B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410089116.0A CN117609704B (en) 2024-01-23 Electric metering error analysis device of intelligent ammeter based on neural network model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410089116.0A CN117609704B (en) 2024-01-23 Electric metering error analysis device of intelligent ammeter based on neural network model

Publications (2)

Publication Number Publication Date
CN117609704A true CN117609704A (en) 2024-02-27
CN117609704B CN117609704B (en) 2024-04-19

Family

ID=

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100324845A1 (en) * 2005-01-27 2010-12-23 Electro Industries/Gauge Tech. Intelligent electronic device with enhanced power quality monitoring and communication capabilities
US20140159753A1 (en) * 2011-07-01 2014-06-12 Xuanlai You Online alternating current detection device and method
US20170147930A1 (en) * 2015-01-30 2017-05-25 Hewlett Packard Enterprise Development Lp Performance testing based on variable length segmentation and clustering of time series data
CN108764460A (en) * 2018-05-16 2018-11-06 华中科技大学 A kind of Time Series Forecasting Methods based on time convolution sum LSTM
US20200148395A1 (en) * 2018-01-26 2020-05-14 Dalian University Of Technology Method for prediction of key performance parameters of aero-engine in transition condition
CN111898499A (en) * 2020-07-17 2020-11-06 东南大学 Multi-harmonic source harmonic responsibility division method based on mutual approximation entropy and clustering
CN115102286A (en) * 2022-07-06 2022-09-23 深圳市中创电测技术有限公司 Loop inspection method for station area intelligent fusion terminal alternate mining module and alternate mining module
CN116148527A (en) * 2023-04-18 2023-05-23 青岛高科通信股份有限公司 Electronic electric energy meter transformation device capable of correcting errors
US20230316051A1 (en) * 2021-08-06 2023-10-05 Dalian University Of Technology Pre-alarming method for rotary stall of compressors based on temporal dilated convolutional neural network
CN116910655A (en) * 2023-06-28 2023-10-20 广西电网有限责任公司 Intelligent ammeter fault prediction method based on device measurement data
CN116930609A (en) * 2023-05-24 2023-10-24 国网河北省电力有限公司营销服务中心 Electric energy metering error analysis method based on ResNet-LSTM model
CN117272117A (en) * 2023-11-10 2023-12-22 国网冀北电力有限公司 Electric energy metering method and system based on historical data analysis

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100324845A1 (en) * 2005-01-27 2010-12-23 Electro Industries/Gauge Tech. Intelligent electronic device with enhanced power quality monitoring and communication capabilities
US20140159753A1 (en) * 2011-07-01 2014-06-12 Xuanlai You Online alternating current detection device and method
US20170147930A1 (en) * 2015-01-30 2017-05-25 Hewlett Packard Enterprise Development Lp Performance testing based on variable length segmentation and clustering of time series data
US20200148395A1 (en) * 2018-01-26 2020-05-14 Dalian University Of Technology Method for prediction of key performance parameters of aero-engine in transition condition
CN108764460A (en) * 2018-05-16 2018-11-06 华中科技大学 A kind of Time Series Forecasting Methods based on time convolution sum LSTM
CN111898499A (en) * 2020-07-17 2020-11-06 东南大学 Multi-harmonic source harmonic responsibility division method based on mutual approximation entropy and clustering
US20230316051A1 (en) * 2021-08-06 2023-10-05 Dalian University Of Technology Pre-alarming method for rotary stall of compressors based on temporal dilated convolutional neural network
CN115102286A (en) * 2022-07-06 2022-09-23 深圳市中创电测技术有限公司 Loop inspection method for station area intelligent fusion terminal alternate mining module and alternate mining module
CN116148527A (en) * 2023-04-18 2023-05-23 青岛高科通信股份有限公司 Electronic electric energy meter transformation device capable of correcting errors
CN116930609A (en) * 2023-05-24 2023-10-24 国网河北省电力有限公司营销服务中心 Electric energy metering error analysis method based on ResNet-LSTM model
CN116910655A (en) * 2023-06-28 2023-10-20 广西电网有限责任公司 Intelligent ammeter fault prediction method based on device measurement data
CN117272117A (en) * 2023-11-10 2023-12-22 国网冀北电力有限公司 Electric energy metering method and system based on historical data analysis

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
WEI ZHANG 等: "Fault Rate Estimation of Electric Energy Meter Baded on WAPOD-NHBM", ICAITA, 31 December 2022 (2022-12-31), pages 1 - 9 *
吴浩瀚;蒋刚;: "基于量子滤波器的电能数据检测与分析", 电信科学, no. 05, 20 May 2017 (2017-05-20), pages 188 - 193 *
赵晓东;王晶;: "脉动风作用下经纬仪保护窗口镜面波像差预测", 科学技术与工程, no. 04, 8 February 2017 (2017-02-08), pages 208 - 212 *

Similar Documents

Publication Publication Date Title
Ciancetta et al. A new convolutional neural network-based system for NILM applications
CN109685314B (en) Non-intrusive load decomposition method and system based on long-term and short-term memory network
CN111242391B (en) Machine learning model training method and system for power load identification
CN111382789B (en) Power load identification method and system based on machine learning
CN103941254A (en) Soil physical property classification recognition method and device based on geological radar
CN113687433B (en) Bi-LSTM-based magnetotelluric signal denoising method and system
CN110298085A (en) Analog-circuit fault diagnosis method based on XGBoost and random forests algorithm
CN109767054A (en) Efficiency cloud appraisal procedure and edge efficiency gateway based on deep neural network algorithm
CN112435142B (en) Power load identification method and load power utilization facility knowledge base construction method thereof
CN108535635A (en) A kind of analog circuit intermittent fault diagnostic method based on EEMD and HMM
CN109359665A (en) A kind of family's electric load recognition methods and device based on support vector machines
CN114662414B (en) Oil reservoir production prediction method based on graph wavelet neural network model
CN115423163A (en) Method and device for predicting short-term flood events of drainage basin and terminal equipment
CN112507479B (en) Oil drilling machine health state assessment method based on manifold learning and softmax
CN104268408A (en) Energy consumption data macro-forecast method based on wavelet coefficient ARMA model
CN111639583A (en) Method and system for identifying power quality disturbance of power grid
CN114184870A (en) Non-invasive load identification method and equipment
Zhang et al. Complementary ensemble adaptive local iterative filtering and its application to rolling bearing fault diagnosis
CN117609704B (en) Electric metering error analysis device of intelligent ammeter based on neural network model
CN113327008A (en) Electricity stealing detection method, system and medium based on time sequence automatic encoder
CN116681186A (en) Power quality analysis method and device based on intelligent terminal
CN117290679A (en) Running state detection method and device of current transformer and electronic equipment
CN117609704A (en) Electric metering error analysis device of intelligent ammeter based on neural network model
CN107069710B (en) Power system state estimation method considering new energy space-time correlation
CN116628620A (en) Non-invasive load identification calculation method

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