Electricity meter error compensation method, device and medium
By deploying the backpropagation neural network error estimation model locally on the power meter and combining the remote parameter update of the data master station, the problem that the accuracy of the power meter meter is affected by the autothermal effect and environmental factors is solved, and a high-precision error compensation effect is achieved.
Patent Information
- Application Number
- CN202411119071.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2044-08-15
AI Technical Summary
During the metering process, the measurement accuracy of existing electricity meters is affected due to changes in the autothermal effect and environmental factors. The existing error compensation technology cannot effectively eliminate the error caused by load current differences and has high calculation complexity.
The backpropagation neural network error estimation model is used to deploy a local backpropagation neural network error estimation model based on load current, microcontroller temperature and terminal seat temperature. The data master station remotely updates the model parameters when the model error is greater than the preset threshold, combining on-site operation and main station operation to improve metrological accuracy.
It realizes high-precision metering of the power meter in complex environments, ensures the reliability and accuracy of error compensation, and adapts to various environmental changes and load conditions.
Smart Images

Figure CN119199700B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric energy meter measurement, and in particular to an electric energy meter error compensation method, device and medium. Background Art
[0002] Smart IoT-connected energy meters play a vital role in modern power systems, and their metering accuracy is a key indicator of meter performance. However, during operation, self-heating and environmental changes can significantly impact metering accuracy.
[0003] Currently, there are two main approaches to error compensation for electricity meters. The first approach relies on sampling element monitoring. This approach involves the interaction between the metering chip and the sampling element, monitoring changes in the sampling element's output signal and then performing error compensation. This approach requires the meter to be equipped with a metering chip capable of self-monitoring errors. However, since the constant electrical signal emitted by the metering chip is easily affected by environmental factors, this can lead to large compensation errors. The second approach relies on temperature-based error compensation. This approach monitors the relationship between the meter's internal temperature and active pulse error, adjusting the power gain in real time. While this approach addresses some of the errors caused by temperature fluctuations, it cannot eliminate errors caused by load current variations. The nonlinear relationship between temperature and error increases the complexity of the fitting curve, placing a heavy computational burden on the microcontroller, potentially impacting its normal operation.
[0004] Therefore, how to efficiently and reliably improve the measurement accuracy of electricity meters remains an urgent problem to be solved. Summary of the Invention
[0005] The present invention provides an electric energy meter error compensation method, device and medium, which are used to solve the defect of inaccurate measurement of electric energy meters in related technologies.
[0006] The present invention provides an electric energy meter error compensation method, which is applied to an electric energy meter. The electric energy meter error compensation method includes:
[0007] Determining basic parameters of the electric energy meter;
[0008] Inputting the basic parameters into an error estimation model deployed locally on the electric energy meter to obtain a local estimated error output by the error estimation model, wherein the parameters of the error estimation model are remotely updated by a data master station, and the data master station updates the parameters of the error estimation model when the model error of the error estimation model is greater than a preset threshold;
[0009] Based on the local estimated error, error compensation is performed on the measurement result of the electric energy meter.
[0010] According to an electric energy meter error compensation method provided by the present invention, the basic parameters include the load current of the electric energy meter, the temperature of the single chip microcomputer and the temperature of the terminal block;
[0011] Inputting the basic parameters into an error estimation model deployed locally on the electric energy meter to obtain a local estimation error output by the error estimation model includes:
[0012] The load current, the temperature of the single chip microcomputer and the temperature of the terminal block of the electric energy meter are input into an error estimation model deployed locally on the electric energy meter to obtain a local estimation error output by the error estimation model.
[0013] According to an electric energy meter error compensation method provided by the present invention, the model error is the difference between the local estimation error and the master station estimation error;
[0014] The master station estimation error is obtained by the data master station performing error estimation on the electric energy meter based on a master station estimation model. The master station estimation model is deployed at the data master station, and the scale of the master station estimation model is greater than or equal to the scale of the error estimation model.
[0015] According to an electric energy meter error compensation method provided by the present invention, the input parameters of the master station estimation model include the basic parameters and the operating time, power factor and grid frequency of the electric energy meter.
[0016] According to an electric energy meter error compensation method provided by the present invention, the power factor includes an instantaneous value of the power factor and an average value of the power factor;
[0017] The grid frequency includes an instantaneous grid frequency value and an average grid frequency value.
[0018] According to an electric energy meter error compensation method provided by the present invention, the error estimation model is a back propagation neural network.
[0019] The present invention also provides a parameter updating method for an error estimation model, which is applied to a data master station. The parameter updating method for the error estimation model comprises:
[0020] Obtaining a model error of an error estimation model, where the error estimation model is deployed locally at the electric energy meter, the error estimation model being used to output a local estimation error based on basic parameters of the electric energy meter, and the local estimation error being used to perform error compensation on a metering result of the electric energy meter;
[0021] When the model error is greater than a preset threshold, parameters of the error estimation model are updated, and the updated parameters are configured locally in the electric energy meter.
[0022] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the electric energy meter error compensation method or the error estimation model parameter updating method as described above is implemented.
[0023] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for compensating the error of an electric energy meter or the method for updating the parameters of an error estimation model as described above is implemented.
[0024] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the above-mentioned methods for compensating for an electric energy meter error or updating parameters of an error estimation model.
[0025] The electric energy meter error compensation method, device, and medium provided by the present invention first employ an error estimation model to perform error compensation on the electric energy meter, effectively ensuring the reliability of the error estimation. Furthermore, when the model error of the error estimation model exceeds a preset threshold, the model parameters are remotely updated via a data master station. Specifically, error estimation is performed using an on-site electric energy meter, and parameter updates are performed using a remote data master station. This combination of on-site and master station calculations further ensures the reliability and accuracy of error compensation, even within the limited computing resources of the electric energy meter itself. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the present invention or related technologies, the following is a brief introduction to the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0027] Figure 1 It is a flow chart of the electric energy meter error compensation method provided by the present invention.
[0028] Figure 2 It is a schematic diagram of the back propagation neural network structure provided by the present invention.
[0029] Figure 3 It is a flow chart of the parameter updating method of the error estimation model provided by the present invention.
[0030] Figure 4 It is a structural schematic diagram of the electric energy meter error compensation device provided by the present invention.
[0031] Figure 5 It is a structural diagram of a parameter updating device for an error estimation model provided by the present invention.
[0032] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0033] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0034] During the operation of smart IoT electricity meters, self-heating (internal heating of the manganese-copper element) and environmental factors can lead to metering errors. Existing smart IoT electricity meters typically use a single-chip microcontroller (MCU) and a metering chip for energy measurement. The metering chip's accuracy depends on the correction factors programmed into it by the MCU program. Among these correction factors, the power gain factor has the most direct impact on metering accuracy. Therefore, the key to error compensation lies in how the MCU program dynamically adjusts the power gain. Existing error compensation technologies primarily employ two approaches.
[0035] The first solution is error compensation based on sampling element monitoring. This solution requires the metering chip to have a self-monitoring function for errors. The basic principle is that when the electricity meter leaves the factory, the metering chip actively outputs a constant electrical signal to the sampling element and records the sampling element output signal value as a reference signal. After the electricity meter leaves the factory, this operation is repeated at regular intervals to monitor whether the signal value output by the sampling element deviates from the reference signal. If the signal value deviates, the metering chip adjusts the power gain factor accordingly. This solution can eliminate errors caused by environmental factors, but it requires a specific metering chip, and if the constant electrical signal is affected by the environment, it will lead to inaccurate compensation.
[0036] Another approach is temperature-based error compensation. The basic principle is to plot a curve relating the meter's internal temperature to the active pulse error and write the resulting expression into the meter. During meter operation, the microcontroller program monitors the internal temperature in real time and dynamically adjusts the power gain based on the curve expression to mitigate the effects of temperature variations on metering accuracy. While this approach partially addresses the error caused by temperature variations, it cannot eliminate errors caused by load current variations. Furthermore, the nonlinear relationship between temperature and error increases computational complexity, placing high demands on the microcontroller's computing power.
[0037] In view of the above problems, an embodiment of the present invention provides an electric energy meter error compensation method. Figure 1 FIG. 1 is a flow chart of the error compensation method for an electric energy meter provided by the present invention. Figure 1 As shown, the method is applied to an electric energy meter, and the method includes:
[0038] Step 110: Determine basic parameters of the electric energy meter.
[0039] The energy meter referred to here is the one requiring error compensation. The energy meter itself is capable of collecting its own parameters, and therefore can acquire parameters associated with the pulse error generated during metering. In this embodiment of the present invention, the parameters associated with the pulse error that the energy meter can collect are recorded as basic parameters.
[0040] For example, the load current and temperature of the energy meter can be used as basic parameters. Furthermore, the temperature of the energy meter can be further refined to include the temperature of the microcontroller inside the energy meter and the temperature of the terminal block of the energy meter as basic parameters of the energy meter, which is not specifically limited in the embodiments of the present invention.
[0041] In step 120, the basic parameters are input into an error estimation model deployed locally at the electric energy meter to obtain a local estimated error output by the error estimation model. The parameters of the error estimation model are remotely updated by a data master station. The data master station updates the parameters of the error estimation model when the model error of the error estimation model is greater than a preset threshold.
[0042] Specifically, in order to quickly and conveniently implement error compensation for the electricity meter, an error estimation model can be deployed locally in the electricity meter. Here, the error estimation model is a neural network model used for error estimation. It can be understood that deploying the error estimation model locally in the electricity meter here specifically means storing the parameters of the error estimation model locally in the electricity meter. Therefore, when error compensation is required for the electricity meter, the electricity meter can perform error estimation based on the collected basic parameters of the electricity meter and the parameters of the locally stored error estimation model, thereby obtaining the local estimated error of the electricity meter.
[0043] During specific operation, the electric energy meter can use the basic parameters of the electric energy meter obtained in step 110 as input parameters of the locally deployed error estimation model. That is, the basic parameters of the electric energy meter are input into the error estimation model, and the error estimation model is locally run to implement error estimation based on the basic parameters of the electric energy meter. The output result of the error estimation model can be used as the local estimated error. Here, the local estimated error is the forward active pulse error of the electric energy meter obtained by local estimation at the electric energy meter.
[0044] On this basis, in order to ensure the reliability and accuracy of the error estimation model itself, it is necessary to monitor the model error of the error estimation model and update and optimize the parameters of the error estimation model when the model error is greater than the preset threshold. The model error referred to here can be understood as the difference between the local estimated error output by the error estimation model and the true error. The smaller the difference between the two, the smaller the model error and the higher the reliability and accuracy of the error estimation model itself. Conversely, the larger the difference between the two, the larger the model error and the lower the reliability and accuracy of the error estimation model itself.
[0045] Considering the limited computing power of the energy meter itself, and the fact that updating and optimizing the parameters of the error estimation model typically requires a significant amount of computing power, this type of complex calculation is clearly unsuitable for running on the energy meter. To address this issue, in an embodiment of the present invention, the error estimation model parameters are updated based on a data master station, which then remotely configures the updated parameters to the energy meter.
[0046] Here, the data master station is a device with powerful computing capabilities and the ability to communicate with the energy meter. For example, at the equipment site, a portable computer equipped with a data transmission device can be used as the data master station. The data master station monitors the model error of the error estimation model deployed locally at the energy meter. If the model error exceeds a preset threshold, it updates and optimizes the parameters of the error estimation model. The updated parameters are then remotely configured to the energy meter. This allows the parameters of the error estimation model at the energy meter to be updated, ensuring the reliability and accuracy of the error estimation performed locally at the energy meter.
[0047] Here, the preset threshold is a pre-set threshold, and the preset threshold can be understood as the maximum value of the tolerable model error.
[0048] Step 130: Perform error compensation on the measurement result of the electric energy meter based on the local estimated error.
[0049] Specifically, after the local estimation error is obtained, the power gain coefficient inside the electric energy meter can be dynamically adjusted based on the local estimation error to correct the measurement error of the electric energy meter.
[0050] In practical applications, the energy meter can monitor basic parameters (such as load current, microcontroller temperature, and terminal block temperature) in real time. These parameters are input into a locally deployed error compensation model to obtain a local estimated error. Based on this local estimated error, the power gain factor is adjusted to make the meter's output more accurate.
[0051] Furthermore, for applications requiring high accuracy, such as industrial electricity, the data master station can optimize and update the error estimation model, remotely configuring and updating the optimized model parameters to the on-site energy meter, thereby ensuring high-precision and reliable error compensation. This dynamic adjustment and parameter update method enables the energy meter to maintain high-precision measurement performance in a variety of complex environments.
[0052] The electric energy meter error compensation method provided by the present invention first uses an error estimation model to perform error compensation on the electric energy meter, effectively ensuring the reliability of the error estimation. Furthermore, when the model error of the error estimation model exceeds a preset threshold, the model parameters are remotely updated via a data master station. Specifically, error estimation is performed using an on-site electric energy meter, and parameter updates are performed using a remote data master station. This combination of on-site and master station calculations further ensures the reliability and accuracy of error compensation, given the limited computing power resources of the electric energy meter itself.
[0053] Based on the above embodiment, the basic parameters include the load current of the electric energy meter, the temperature of the single chip microcomputer and the temperature of the terminal block;
[0054] Accordingly, in step 120, inputting the basic parameters into an error estimation model deployed locally on the electric energy meter to obtain a local estimation error output by the error estimation model includes:
[0055] The load current, the temperature of the single chip microcomputer and the temperature of the terminal block of the electric energy meter are input into an error estimation model deployed locally on the electric energy meter to obtain a local estimation error output by the error estimation model.
[0056] Specifically, when applying the error estimation model deployed locally on the electricity meter to perform error estimation, that is, performing on-site calculations, parameters including the load current, microcontroller temperature and terminal block temperature of the electricity meter can be used as basic parameters input into the error estimation model. Thus, the error estimation model can realize the estimation of the forward active pulse error of the electricity meter locally on the basis of the load current, microcontroller temperature and terminal block temperature.
[0057] It is understandable that the load current, microcontroller temperature and terminal block temperature of the electric energy meter referred to here are all for the same moment.
[0058] Based on any of the above embodiments, the error estimation model is a back propagation neural network.
[0059] Specifically, the on-site computational component, i.e., the error estimation model deployed locally on the electricity meter, can be a back-propagation neural network. In this embodiment of the present invention, a trained back-propagation neural network can be used to accurately estimate the error of the electricity meter, thereby dynamically adjusting compensation parameters to improve metering accuracy.
[0060] Figure 2 This is a schematic diagram of the back propagation neural network structure provided by the present invention. Figure 2 As shown, the back propagation neural network adopts a four-layer structural model, including an input layer, two hidden layers and an output layer. Among them, the input layer includes 3 neurons, corresponding to the input load current, the temperature of the single-chip computer and the temperature of the terminal block respectively; the first hidden layer includes 6 neurons, using the rectified linear unit (Rectified Linear Unit) as the activation function; the second hidden layer includes 4 neurons, also using the rectified linear unit as the activation function; the output layer includes 1 neuron, and the output is the error value of the electricity meter, that is, the local estimation error. When training the back propagation neural network, the learning rate and the maximum number of training times can be set. For example, the learning rate can be set to 0.001 and the maximum number of training times can be set to 100,000 times. The embodiment of the present invention does not impose any restrictions on this.
[0061] Assume that the neuron set of the network input layer is represented as:
[0062]
[0063] in, x 1, x 2, x 3 are load current, MCU temperature and terminal block temperature respectively.
[0064] The first hidden layer neuron set is expressed as:
[0065]
[0066] The second hidden layer neuron set is expressed as:
[0067]
[0068] The output layer neuron set is expressed as:
[0069]
[0070] The set of bias coefficients of the first hidden layer is expressed as:
[0071]
[0072] The set of bias coefficients of the second hidden layer is expressed as:
[0073]
[0074] The weight matrix between the input layer and the first hidden layer is expressed as:
[0075]
[0076] The weight matrix between the first hidden layer and the second hidden layer is expressed as:
[0077]
[0078] The weight matrix between the second hidden layer and the output layer is expressed as:
[0079]
[0080] During the forward propagation process of the error estimation model, the input layer receives the basic parameters of the electricity meter and passes the basic parameters to each neuron in the first hidden layer. The weighted sum of each neuron is calculated and the output of the neuron is adjusted using a rectified linear unit. The output of the first hidden layer is then passed to the second hidden layer for similar calculations. Finally, the output of the second hidden layer is passed to the output layer, which calculates and outputs the error estimate as the local estimated error. It can be understood that the forward propagation process of the error estimation model can be understood as the process of performing error estimation based on the error estimation model after obtaining the basic parameters.
[0081] Specifically, the first hidden layer j The input value of a neuron , output value ; The second hidden layer j The input value of a neuron , output value ; Input value of output layer neuron , output value o Equal to input value O , output value o This is the prediction result of the network, that is, the local estimation error.
[0082] In addition, before applying the error estimation model to perform error estimation, the error estimation model needs to be trained. The training process here can be performed on a host computer other than the electricity meter.
[0083] Here, the process of training the error estimation model can also be understood as the process of backpropagation for the error estimation model.
[0084] For the back propagation process of the error estimation model, the error between the actual output of the output layer and the target output (true error value) is calculated, the error is passed back to each layer through the back propagation algorithm, the gradient of each weight and bias is calculated, and the weights and biases are adjusted using the gradient descent method to minimize the error function.
[0085] Specifically, in the back propagation process, the model parameters need to be initialized first, that is, the bias coefficient set BM 、 BN and the matrix WX 、 WM 、 WN Perform random initialization. Then, calculate the output value of each sample in the training set o Next, the error of the error estimation model is calculated.
[0086] Here, the error of the error estimation model can be expressed as ,in A represents the number of samples in the training set, o i Indicates the i The output value of the sample, o i ' indicates the i Based on the calculated error of the error estimation model, the parameters of the error estimation model can be iteratively updated.
[0087] Here, the update process for parameters including bias coefficients and weight matrices in the error estimation model is as follows:
[0088] BM The update algorithm is , where After the tth adjustment The value of After the t+1th adjustment The value of Error e Bias coefficient The partial derivative of .
[0089] BN The update algorithm is , where After the tth adjustment The value of After the t+1th adjustment The value of Error e Bias coefficient The partial derivative of .
[0090] WX The update algorithm is , where After the tth adjustment The value of After the t+1th adjustment The value of Error e Weight coefficient The partial derivative of .
[0091] WM The update algorithm is , where After the tth adjustment The value of After the t+1th adjustment The value of Error e Weight coefficient The partial derivative of .
[0092] WN The update algorithm is , where After the tth adjustment The value of After the t+1th adjustment The value of Error e Weight coefficient The partial derivative of .
[0093] In the embodiment of the present invention, the above training process first requires obtaining training samples. In order to train the back propagation neural network, a large number of training samples need to be collected. The training samples contain the operating data of the electric energy meter under different load currents, specifically including the temperature of the single chip computer, the temperature of the terminal block and the measured pulse error. In the embodiment of the present invention, the minimum current value I min , the turning current value I tr , ten times the turning current value 10I tr , half of the maximum current value I max / 2 and the maximum current value I max , as the sampling point of the load current, that is, the value point of the load current in the training sample. Thus, the load current is recorded i , MCU temperature T 0. Terminal seat temperature T 1 and active pulse error o ′, and finally form the training samples. For example, the training samples can be expressed as shown in the following table:
[0094] Table 1 Training samples
[0095]
[0096] It should be noted that at a current of 10,000 mA, the MCU temperature may be 23.5°C, or any value in the range of 23.5°C to 55.0°C (including 55.0°C). The corresponding terminal block temperature value is the same. The ultimate goal is to calculate the pulse error based on the first three parameters, and then correct the measurement results of the electricity meter.
[0097] Once the training samples are obtained, the back propagation neural network can be trained. The goal of the training is to use a large amount of training data and repeated optimization to enable the back propagation neural network to accurately predict the error of the electricity meter under different conditions.
[0098] First, the obtained training samples are randomly arranged and divided into a training set and a test set. The first 80% of the samples are used for training, and the last 20% of the samples are used for testing. The training set is used to adjust the weights and biases of the neural network, while the test set is used to evaluate the generalization ability and accuracy of the model. Then, the weight matrix and bias coefficients of the neural network are randomly initialized. The weight matrix includes the weight matrix between the input layer and the first hidden layer. WX , the weight matrix between the first hidden layer and the second hidden layer WM , the weight matrix between the second hidden layer and the output layer WN The bias coefficient set includes the bias coefficient set of the first hidden layer BM and the bias coefficient set of the second hidden layer BN Then, according to the forward propagation calculation method, the output value of each sample is calculated. o Compare the actual output value 𝑜 of the output layer with the target output value (the impulse error in the training sample) o ′, calculate the error function. For example, the error function can be expressed as If the error e The error is greater than the set error threshold, and the forward propagation and back propagation processes are repeated until the error e When the error is less than the set threshold or the maximum number of training times is reached, the back propagation neural network gradually adjusts the weights and biases of each layer through repeated iterations, making the output error estimate closer and closer to the target output value.
[0099] Furthermore, after training a backpropagation neural network, it can be tested to evaluate its performance and generalization capabilities, ensuring that it can provide accurate error estimates in real-world applications. This can be done using the last 20% of the test set obtained from the aforementioned partitioning. Since the test set is not used to adjust the network weights and biases during training, it can effectively evaluate the generalization and actual performance of the backpropagation neural network as an error estimation model.
[0100] For each sample data in the test set, its output value is calculated by forward propagation, and the error calculation function is used , calculate the test error. If the error e If the error is still less than the set error threshold, it means that the network parameters are correct. Otherwise, it means that the network has overfitting or underfitting problems, and the learning rate or the maximum number of training times needs to be adjusted and the neural network needs to be retrained.
[0101] After the test is passed, the trained back propagation neural network can be deployed as an error estimation model to the electricity meter to realize on-site operation. In the specific implementation, it is only necessary to set the above model parameters BM 、 BN and the matrix WI 、 WM 、 WN After the data is written to the energy meter, the meter will predict the current forward active pulse error based on the model parameters currently stored in the meter. The meter then adjusts the metering chip's "power gain" coefficient based on this error to compensate for the error. The powerful learning and nonlinear fitting capabilities of the backpropagation neural network enable highly accurate error estimation and compensation, improving the meter's accuracy.
[0102] Based on any of the above embodiments, the parameters of the error estimation model are stored locally in the electric energy meter.
[0103] Specifically, when the meter leaves the factory, the trained and optimized backpropagation neural network model parameters (including weight matrices and bias coefficients) are pre-loaded and stored in the meter's local memory. These model parameters encompass all connection weights and bias values between the input, hidden, and output layers, ensuring that the meter can perform real-time error estimation during actual operation.
[0104] Once the meter is operational, the on-site computational component monitors and processes basic input parameters (such as load current, MCU temperature, and terminal block temperature) in real time. Using stored model parameters, it calculates the current local estimation error through forward propagation. Based on this local estimation error, the meter dynamically adjusts the power gain factor of its metering chip to correct the measurement error. This process occurs entirely locally within the meter, without relying on external data or computing resources, ensuring real-time and high efficiency.
[0105] This implementation enables the meter to quickly and accurately perform error compensation through on-site calculations, ensuring basic metering accuracy and reliability. Furthermore, locally stored model parameters facilitate rapid response and adjustment during meter operation, adapting to various basic environmental changes and load conditions, thereby meeting the meter's error calculation requirements.
[0106] Based on any of the above embodiments, the model error is the difference between the local estimation error and the master station estimation error;
[0107] The master station estimation error is obtained by the data master station performing error estimation on the electric energy meter based on a master station estimation model. The master station estimation model is deployed at the data master station, and the scale of the master station estimation model is greater than or equal to the scale of the error estimation model.
[0108] Specifically, a master station estimation model is deployed at the data master station. Similar to the error estimation model deployed locally at the electric energy meter, the master station estimation model is also used for error estimation.
[0109] Furthermore, because the data master itself possesses powerful computing capabilities and can handle massive amounts of data, the master estimation model deployed at the data master can be larger in scale than the error estimation model deployed locally on the energy meter. Consequently, the master estimation model offers higher accuracy and reliability in error estimation than the error estimation model.
[0110] It is understandable that the scale of the master station estimation model is greater than or equal to the scale of the error estimation model, which can be specifically reflected in the master station estimation model having more model parameters and more types of input parameters of the master station estimation model. The embodiment of the present invention does not make specific limitations on this.
[0111] Considering that the scale of the master station estimation model is equal to or greater than the scale of the error estimation model, that is, the master station estimation model has better error estimation accuracy than the error estimation model, during the error compensation process for the electric energy meter, while obtaining the local estimated error based on the error estimation model deployed locally at the electric energy meter, the master station estimated error can also be obtained based on the master station estimation model deployed at the data master station. It can be understood that the master station estimated error is more reliable than the local estimated error.
[0112] Therefore, after respectively obtaining the local estimation error and the master station estimation error, the difference between the local estimation error and the master station estimation error can be calculated, and the difference can be used as the model error of the local estimation model.
[0113] Based on any of the above embodiments, the input parameters of the master station estimation model include the basic parameters and the operating time, power factor and grid frequency of the electric energy meter.
[0114] Specifically, since the master station operation implemented by the master station estimation model at the data master station adopts high-performance, high-computing power equipment, it can handle more complex computing tasks and can therefore effectively process richer input data, thereby improving the accuracy and reliability of error estimation.
[0115] Therefore, in this embodiment of the present invention, in addition to using basic parameters such as load current, MCU temperature, and terminal block temperature as input parameters for the master station estimation model, more parameters that affect metering accuracy can also be obtained as input parameters for the master station estimation model. Specifically, the input parameters of the master station estimation model can also include the meter's operating hours, power factor, and grid frequency. These parameters provide the data master station with more comprehensive operating status and environmental information for error estimation, facilitating a more accurate estimation of the meter's error.
[0116] In practical applications, various parameters, including load current, MCU temperature, terminal block temperature, operating time, power factor, and grid frequency, can be input into the master estimation model at the data master station to enable training and optimization of the master estimation model. Compared to the error estimation model deployed locally on the energy meter, the trained and optimized master estimation model can handle more variables and more complex inputs, providing more accurate error estimates.
[0117] Based on any of the above embodiments, the power factor includes an instantaneous value of the power factor and an average value of the power factor; and the grid frequency includes an instantaneous value of the grid frequency and an average value of the grid frequency.
[0118] Specifically, the input parameters of the master station estimation model, power factor and grid frequency, can be categorized as instantaneous values and average values. The instantaneous value is a set of data and the corresponding error recorded by the system at a specific instant, while the average value is the arithmetic mean of the parameter from the time the meter is enabled / restarted or from a specific point in time until a set of data is recorded.
[0119] For example, the master station estimation error can be calculated at the data master station as follows:
[0120] First, collect and prepare various operating parameters of the energy meter, including: load current i , MCU temperature 𝑇0, terminal block temperature T 1. Operating time, power factor, and grid frequency. The power factor and grid frequency can be further divided into instantaneous value and average value. Input the above parameters into the trained and optimized master station estimation model to obtain the master station estimation error estimated by the master station estimation model. o '',Right now:
[0121]
[0122] In addition, the local estimation error calculated by the error estimation model at the local electricity meter is It can be expressed as:
[0123]
[0124] Among them, k0, k1 and k2 are correction coefficients, 、 and Both are model functions. PF , f grd are the instantaneous values of power factor and grid frequency, is the average value of power factor and grid frequency, t run is the running time.
[0125] Error compared to local estimation calculated under field conditions Compared with the master station, the master station estimation error obtained under the master station condition is o ''In the calculation, the input parameters are increased from 3 to 8 (at the same time, the correction coefficient is set according to the characteristics of each data k ), and introduced two variable averages to verify the cumulative error effect, while increasing the number of neurons according to demand, so that the error relative to the local estimation can be obtained More accurate and reliable master station estimation error o′′.
[0126] In the electric energy meter error compensation method provided in the embodiment of the present invention, the output value of the error estimation model of the neural network structure is used as the compensation data for the operation error of the electric energy meter. Since a nonlinear activation function is added to the neural network, theoretically, as long as the number of neurons and layers is increased sufficiently, the neural network can fit any function. Therefore, the error estimation model used in the embodiment of the present invention has a strong generalization ability.
[0127] In addition, the parameters of the error estimation model in the embodiment of the present invention support dynamic updating. If higher compensation accuracy is desired, the parameters can be optimized and updated through the data master station. Moreover, if more input features are added to the error estimation model or the number of neurons is increased, the solution provided by the embodiment of the present invention is still applicable.
[0128] Furthermore, the error estimation model in the embodiment of the present invention is trained on the data master station and applied to the electricity meter. Since the complex calculations of the error estimation model lie in the training process and the computational complexity of the application process is relatively simple, the compensation method provided in the embodiment of the present invention has no obvious impact on the performance requirements of the single-chip microcomputer of the electricity meter.
[0129] Based on any of the above embodiments, Figure 3 FIG. 1 is a flow chart of the parameter updating method of the error estimation model provided by the present invention. Figure 3 As shown, the method is applied to a data master station, and the method includes:
[0130] Step 310: Obtain a model error of an error estimation model, where the error estimation model is deployed locally at the electric energy meter. The error estimation model is used to output a local estimation error based on basic parameters of the electric energy meter. The local estimation error is used to perform error compensation on a metering result of the electric energy meter.
[0131] Step 320 : When the model error is greater than a preset threshold, update the parameters of the error estimation model and configure the updated parameters locally in the electric energy meter.
[0132] The energy meter referred to here is the one requiring error compensation. The energy meter itself is capable of collecting its own parameters, and therefore can acquire parameters associated with the pulse error generated during metering. In this embodiment of the present invention, the parameters associated with the pulse error that the energy meter can collect are recorded as basic parameters.
[0133] For example, the load current and temperature of the energy meter can be used as basic parameters. Furthermore, the temperature of the energy meter can be further refined to include the temperature of the microcontroller inside the energy meter and the temperature of the terminal block of the energy meter as basic parameters of the energy meter, which is not specifically limited in the embodiments of the present invention.
[0134] In order to quickly and conveniently implement error compensation for the electricity meter, an error estimation model can be deployed locally in the electricity meter. Here, the error estimation model is a neural network model used for error estimation. It can be understood that deploying the error estimation model locally in the electricity meter here specifically means storing the parameters of the error estimation model locally in the electricity meter. Therefore, when error compensation is required for the electricity meter, the electricity meter can perform error estimation based on the collected basic parameters of the electricity meter and the parameters of the locally stored error estimation model, thereby obtaining the local estimated error of the electricity meter.
[0135] During operation, the electric energy meter can use its basic parameters as input parameters for a locally deployed error estimation model. Specifically, the basic parameters are input into the error estimation model, and the error estimation model is run locally to perform error estimation based on the basic parameters. The output of the error estimation model can then be used as the local estimated error. Here, the local estimated error refers to the forward active pulse error of the electric energy meter, estimated locally at the electric energy meter.
[0136] On this basis, in order to ensure the reliability and accuracy of the error estimation model itself, it is necessary to monitor the model error of the error estimation model. The model error referred to here can be understood as the difference between the local estimated error output by the error estimation model and the true error. The smaller the difference between the two, the smaller the model error and the higher the reliability and accuracy of the error estimation model itself. Conversely, the larger the difference between the two, the larger the model error and the lower the reliability and accuracy of the error estimation model itself.
[0137] Considering the limited computing power of the energy meter itself, and the fact that updating and optimizing the parameters of the error estimation model typically requires a significant amount of computing power, this type of complex calculation is clearly unsuitable for running on the energy meter. To address this issue, in an embodiment of the present invention, the error estimation model parameters are updated based on a data master station, which then remotely configures the updated parameters to the energy meter.
[0138] Here, the data master station is a device with powerful computing capabilities and the ability to communicate with the energy meter. For example, at the equipment site, a portable computer equipped with a data transmission device can be used as the data master station. The data master station monitors the model error of the error estimation model deployed locally at the energy meter. If the model error exceeds a preset threshold, it updates and optimizes the parameters of the error estimation model. The updated parameters are then remotely configured to the energy meter. This allows the parameters of the error estimation model at the energy meter to be updated, ensuring the reliability and accuracy of the error estimation performed locally at the energy meter.
[0139] Here, the preset threshold is a pre-set threshold, and the preset threshold can be understood as the maximum value of the tolerable model error.
[0140] It can be understood that, at the electric energy meter, the updated model parameters can be stored, and the updated model parameters can be applied to achieve error estimation for the electric energy meter, and the estimated local estimation error can be applied to achieve electric energy meter compensation.
[0141] The parameter updating method for the error estimation model provided by the present invention first uses the error estimation model to perform error compensation on the electric energy meter, effectively ensuring the reliability of the error estimation. Furthermore, when the model error of the error estimation model exceeds a preset threshold, the model parameters are remotely updated via a data master station. Specifically, the error estimation is performed using the on-site electric energy meter, and the parameter update is performed using the remote data master station. By combining on-site and master station calculations, the reliability and accuracy of error compensation are further ensured, given the limited computing power resources of the electric energy meter itself.
[0142] The electric energy meter error compensation device provided by the present invention is described below. The electric energy meter error compensation device described below and the electric energy meter error compensation method described above can be referenced to each other.
[0143] Figure 4 This is a schematic diagram of the structure of the electric energy meter error compensation device provided by the present invention. Figure 4 As shown, the device includes:
[0144] A parameter determination unit 410 is configured to determine basic parameters of the electric energy meter;
[0145] an error estimation unit 420, configured to input the basic parameters into an error estimation model deployed locally on the electric energy meter to obtain a local estimated error output by the error estimation model, wherein the parameters of the error estimation model are remotely updated by a data master station, and the data master station updates the parameters of the error estimation model when the model error of the error estimation model is greater than a preset threshold;
[0146] The error compensation unit 430 is configured to perform error compensation on the measurement result of the electric energy meter based on the local estimated error.
[0147] The electric energy meter error compensation device provided by the present invention first uses an error estimation model to perform error compensation on the electric energy meter, effectively ensuring the reliability of the error estimation. Furthermore, when the model error of the error estimation model exceeds a preset threshold, the model parameters are remotely updated via a data master station. Specifically, the error estimation is performed using the on-site electric energy meter, and the parameter updates are performed using a remote data master station. This combination of on-site and master station calculations further ensures the reliability and accuracy of error compensation, given the limited computing power resources of the electric energy meter itself.
[0148] Based on any of the above embodiments, the basic parameters include the load current of the electric energy meter, the temperature of the single chip microcomputer and the temperature of the terminal block;
[0149] The error estimation unit is specifically used for:
[0150] The load current, the temperature of the single chip microcomputer and the temperature of the terminal block of the electric energy meter are input into an error estimation model deployed locally on the electric energy meter to obtain a local estimation error output by the error estimation model.
[0151] Based on any of the above embodiments, the model error is the difference between the local estimation error and the master station estimation error;
[0152] The master station estimation error is obtained by the data master station performing error estimation on the electric energy meter based on a master station estimation model. The master station estimation model is deployed at the data master station, and the scale of the master station estimation model is greater than or equal to the scale of the error estimation model.
[0153] Based on any of the above embodiments, the input parameters of the master station estimation model include the basic parameters and the operating time, power factor and grid frequency of the electric energy meter.
[0154] Based on any of the above embodiments, the power factor includes an instantaneous power factor value and an average power factor value;
[0155] The grid frequency includes an instantaneous grid frequency value and an average grid frequency value.
[0156] Based on any of the above embodiments, the error estimation model is a back propagation neural network.
[0157] The parameter updating device of the error estimation model provided by the present invention is described below. The parameter updating device of the error estimation model described below and the parameter updating method of the error estimation model described above can refer to each other.
[0158] Figure 5 Schematic diagram of the structure of the parameter updating device of the error estimation model provided by the present invention. Figure 5 As shown, the device includes:
[0159] An error acquisition unit 510 is configured to acquire a model error of an error estimation model, wherein the error estimation model is deployed locally at the electric energy meter, and wherein the error estimation model is configured to output a local estimation error based on basic parameters of the electric energy meter, and wherein the local estimation error is configured to perform error compensation on a metering result of the electric energy meter;
[0160] The parameter updating unit 520 is configured to update the parameters of the error estimation model when the model error is greater than a preset threshold, and configure the updated parameters locally in the electric energy meter.
[0161] The parameter updating device for the error estimation model provided by the present invention first uses the error estimation model to perform error compensation on the electric energy meter, effectively ensuring the reliability of the error estimation. Furthermore, when the model error of the error estimation model exceeds a preset threshold, the model parameters are remotely updated via a data master station. Specifically, the error estimation is performed using the on-site electric energy meter, and the parameter update is performed using the remote data master station. This combination of on-site and master station calculations further ensures the reliability and accuracy of error compensation, given the limited computing power resources of the electric energy meter itself.
[0162] Figure 6 An example of a physical structure diagram of an electronic device is shown below. Figure 6As shown, the electronic device may include: a processor 610, a communications interface 620, a memory 630, and a communication bus 640, wherein the processor 610, the communications interface 620, and the memory 630 communicate with each other via the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the electric energy meter error compensation method, which includes:
[0163] Determining basic parameters of the electric energy meter;
[0164] Inputting the basic parameters into an error estimation model deployed locally on the electric energy meter to obtain a local estimated error output by the error estimation model, wherein the parameters of the error estimation model are remotely updated by a data master station, and the data master station updates the parameters of the error estimation model when the model error of the error estimation model is greater than a preset threshold;
[0165] Based on the local estimated error, error compensation is performed on the measurement result of the electric energy meter.
[0166] Alternatively, the processor 610 may call logic instructions in the memory 630 to execute a parameter updating method for the error estimation model, the method comprising:
[0167] Obtaining a model error of an error estimation model, where the error estimation model is deployed locally at the electric energy meter, the error estimation model being used to output a local estimation error based on basic parameters of the electric energy meter, and the local estimation error being used to perform error compensation on a metering result of the electric energy meter;
[0168] When the model error is greater than a preset threshold, parameters of the error estimation model are updated, and the updated parameters are configured locally in the electric energy meter.
[0169] In addition, the logic instructions in the aforementioned memory 630 can be implemented in the form of a software functional unit and, when sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the relevant technology, or the portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0170] On the other hand, the present invention further provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the electric energy meter error compensation method provided by the above methods, which includes:
[0171] Determining basic parameters of the electric energy meter;
[0172] Inputting the basic parameters into an error estimation model deployed locally on the electric energy meter to obtain a local estimated error output by the error estimation model, wherein the parameters of the error estimation model are remotely updated by a data master station, and the data master station updates the parameters of the error estimation model when the model error of the error estimation model is greater than a preset threshold;
[0173] Based on the local estimated error, error compensation is performed on the measurement result of the electric energy meter.
[0174] Alternatively, when the computer program is executed by a processor, the computer can execute the parameter updating method of the error estimation model provided by the above methods, the method comprising:
[0175] Obtaining a model error of an error estimation model, where the error estimation model is deployed locally at the electric energy meter, the error estimation model being used to output a local estimation error based on basic parameters of the electric energy meter, and the local estimation error being used to perform error compensation on a metering result of the electric energy meter;
[0176] When the model error is greater than a preset threshold, parameters of the error estimation model are updated, and the updated parameters are configured locally in the electric energy meter.
[0177] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the error compensation method for the electric energy meter provided by the above methods is implemented. The method includes:
[0178] Determining basic parameters of the electric energy meter;
[0179] Inputting the basic parameters into an error estimation model deployed locally on the electric energy meter to obtain a local estimated error output by the error estimation model, wherein the parameters of the error estimation model are remotely updated by a data master station, and the data master station updates the parameters of the error estimation model when the model error of the error estimation model is greater than a preset threshold;
[0180] Based on the local estimated error, error compensation is performed on the measurement result of the electric energy meter.
[0181] Alternatively, when the computer program is executed by a processor, the computer program is implemented to perform the parameter updating method of the error estimation model provided by the above methods, the method comprising:
[0182] Obtaining a model error of an error estimation model, where the error estimation model is deployed locally at the electric energy meter, the error estimation model being used to output a local estimation error based on basic parameters of the electric energy meter, and the local estimation error being used to perform error compensation on a metering result of the electric energy meter;
[0183] When the model error is greater than a preset threshold, parameters of the error estimation model are updated, and the updated parameters are configured locally in the electric energy meter.
[0184] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0185] Through the description of the above embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the relevant technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.
[0186] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for compensating an electric energy meter error, characterized in that: Applied to an electric energy meter, the electric energy meter error compensation method includes: Determining basic parameters of the electric energy meter; The basic parameters are input into an error estimation model deployed locally at the electric energy meter to obtain a local estimated error output by the error estimation model, the parameters of the error estimation model are remotely updated by the data master station, and the data master station updates the parameters of the error estimation model when the model error of the error estimation model is greater than a preset threshold, the model error being the difference between the local estimated error and the master station estimated error; the master station estimated error is obtained by the data master station performing error estimation on the electric energy meter based on the master station estimation model, the master station estimation model is deployed at the data master station, the scale of the master station estimation model is greater than or equal to the scale of the error estimation model, the model parameters of the master station estimation model are more than the model parameters of the error estimation model, and the input parameter types of the master station estimation model are more than the input parameter types of the error estimation model; Based on the local estimated error, error compensation is performed on the measurement result of the electric energy meter.
2. The electric energy meter error compensation method according to claim 1, characterized in that: The basic parameters include the load current of the electric energy meter, the temperature of the single chip microcomputer and the temperature of the terminal block; Inputting the basic parameters into an error estimation model deployed locally on the electric energy meter to obtain a local estimation error output by the error estimation model includes: The load current, the temperature of the single chip microcomputer and the temperature of the terminal block of the electric energy meter are input into an error estimation model deployed locally on the electric energy meter to obtain a local estimation error output by the error estimation model.
3. The electric energy meter error compensation method according to claim 1, characterized in that: The input parameters of the master station estimation model include the basic parameters and the operating time, power factor and grid frequency of the electric energy meter.
4. The electric energy meter error compensation method according to claim 3, characterized in that: The power factor includes the instantaneous value of the power factor and the average value of the power factor; The grid frequency includes an instantaneous grid frequency value and an average grid frequency value.
5. The electric energy meter error compensation method according to claim 1 or 2, characterized in that: The error estimation model is a back propagation neural network.
6. A parameter updating method for an error estimation model, characterized in that: Applied to the data master station, the parameter updating method of the error estimation model includes: Obtaining a model error of an error estimation model, where the error estimation model is deployed locally at the electric energy meter, the error estimation model is used to output a local estimation error based on basic parameters of the electric energy meter, the local estimation error is used to perform error compensation on a metering result of the electric energy meter, the model error being the difference between the local estimation error and the master station estimation error; the master station estimation error is obtained by the data master station performing error estimation on the electric energy meter based on the master station estimation model, the master station estimation model is deployed at the data master station, the scale of the master station estimation model is greater than or equal to the scale of the error estimation model, the master station estimation model has more model parameters than the error estimation model, and the master station estimation model has more input parameter types than the error estimation model; When the model error is greater than a preset threshold, parameters of the error estimation model are updated, and the updated parameters are configured locally in the electric energy meter.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, it implements the electric energy meter error compensation method according to any one of claims 1 to 5, or implements the parameter updating method of the error estimation model according to claim 6.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the electric energy meter error compensation method according to any one of claims 1 to 5 is implemented, or the parameter updating method of the error estimation model according to claim 6 is implemented.
9. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the electric energy meter error compensation method according to any one of claims 1 to 5 is implemented, or the parameter updating method of the error estimation model according to claim 6 is implemented.
Citation Information
Patent Citations
Direct current charging pile current error compensation method, system and device and readable storage medium
CN114290938A
Metering precision calibration method and device of electric energy meter
CN117741547A