A method and device for predicting the life of an intelligent electric energy meter
By using the Weibull lifetime distribution model and the XGBoost machine learning model, combined with the attribute data of smart electricity meters, accurate prediction of the meter life is achieved, solving the problems of resource waste and storage capacity occupation caused by improper management in existing technologies, and supporting the transformation of the power grid to an energy Internet.
Patent Information
- Application Number
- CN202111125164.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-24
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2041-09-24
AI Technical Summary
The existing management of smart electricity meters lacks scientific and accurate life prediction methods, resulting in heavy disassembly and sorting tasks, storage capacity occupation and cost waste, affecting the strategic development of the power grid's upgrade to an energy Internet.
The Weibull lifetime distribution model and XGBoost machine learning model are used in combination with the attribute data of smart electricity meters. Through clustering, parameter estimation and machine learning model training, the current and remaining lifetime of the electricity meter are predicted. The Weibull distribution function and reliability function are used for life prediction, and the weights are adjusted by calculating the influence of different attribute values and the proportion of clusters.
It improves the accuracy and precision of electricity meter life prediction, reduces waste of manpower and material resources, optimizes electricity meter management, and supports the strategic development of the power grid into an energy Internet.
Smart Images

Figure CN113868947B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method and device for predicting the life of an intelligent electric energy meter, and belongs to the technical field of data mining and intelligent analysis. Background Art
[0002] At present, as my country's smart electricity meters become more and more intelligent and the production and manufacturing level continues to improve, the loss rate of electricity meters under different operating environments and power loads is also different, and the actual quality of electricity meters produced in different batches also varies.
[0003] The current management status of smart energy meters is:
[0004] (1) As the early smart energy meters put into operation have gradually reached their calibration cycles, according to the "Electronic AC Energy Meter Calibration Regulations" (JJG 596-2012) on the service life of energy meters, the calibration cycle of general 0.2S and 0.5S active energy meters and Class 1 and Class 2 reactive energy meters is no more than 6-8 years. This rotation method will lead to heavy tasks of dismantling and sorting, irregular disposal, serious occupancy of storage capacity, and difficulties in storage and preservation.
[0005] (2) Blindly rotating the status of electricity meter measurement assets according to the "periodic, rotational, and post-replacement" model is not conducive to the company's production and operation cost control, and is likely to cause waste of manpower and material resources, affecting the company's strategic development of upgrading from the power grid to the energy Internet.
[0006] Therefore, how to predict the actual service life of the used smart meters has become an important part of the management of smart electricity meters. The existing electricity meter life prediction methods mainly rely on offline summary and collation by personnel. The research objects lack scientificity and it is difficult to accurately predict the life of the electricity meters. Summary of the Invention
[0007] Objective: To overcome the deficiencies in the prior art, the present invention provides a method and device for predicting the life of a smart electric energy meter.
[0008] Technical solution: To solve the above technical problems, the technical solution adopted by the present invention is:
[0009] A method for predicting the life of a smart electric energy meter comprises the following steps:
[0010] According to the attribute data and sorting detection data of the smart electricity meter, the data of the smart electricity meter with failure caused by the error of the non-smart electricity meter is eliminated, and the remaining data is the non-failure data.
[0011] Select the available attribute values in the attribute data in the no-failure data.
[0012] According to the combination of different values in each available attribute value, the smart energy meter is divided into multiple clusters, and a corresponding Weibull life distribution model is constructed for each cluster.
[0013] According to the zero-failure data, the shape parameter and scale parameter of the constructed Weibull life distribution model are estimated using the maximum likelihood function, and the estimated values of the shape parameter and scale parameter are obtained.
[0014] According to the estimated values of shape parameters and scale parameters, the distribution function and reliability function of the current life of the smart electricity meter of the Weibull life distribution model are obtained.
[0015] According to the distribution function of the current life of the smart electric energy meter, the distribution function of the remaining life of the smart electric energy meter is obtained.
[0016] The average predicted value of the current life of the smart meter is obtained through the reliability function of the current life of the smart meter.
[0017] The remaining life prediction value of the smart meter is obtained through the distribution function of the remaining life of the smart meter.
[0018] The average predicted value of the current life of the smart meter is added to the predicted value of the remaining life of the smart meter to obtain the predicted value of the life of the smart meter.
[0019] A device for predicting the life of an intelligent electric energy meter includes the following modules:
[0020] No-failure data acquisition module: used to eliminate the smart energy meter data caused by errors of non-smart energy meters based on the attribute data of the smart energy meter and the sorting detection data, and the remaining data is the no-failure data.
[0021] Available attribute value acquisition module: used to select available attribute values in attribute data from non-failure data.
[0022] Weibull lifetime distribution model construction module: used to divide the smart electricity meter into multiple clusters according to the combination of different values in each available attribute value, and construct a corresponding Weibull lifetime distribution model for each cluster.
[0023] Parameter calculation module: used to estimate the shape parameter and scale parameter of the constructed Weibull life distribution model based on zero-failure data using the maximum likelihood function to obtain the estimated values of the shape parameter and scale parameter.
[0024] Current life acquisition module: used to obtain the distribution function and reliability function of the current life of the smart electricity meter of the Weibull life distribution model based on the estimated values of the shape parameter and scale parameter.
[0025] Remaining life acquisition module: used to obtain the distribution function of the remaining life of the smart energy meter based on the distribution function of the current life of the smart energy meter.
[0026] Current life prediction module: used to obtain the average predicted value of the current life of the smart meter through the reliability function of the current life of the smart meter.
[0027] Remaining life prediction module: used to obtain the predicted value of the remaining life of the smart meter through the distribution function of the remaining life of the smart meter.
[0028] The energy meter life prediction module is used to add the average predicted value of the current life of the smart meter to the predicted value of the remaining life of the smart meter to obtain the predicted value of the life of the smart meter.
[0029] As a preferred solution, it also includes: calculating the difference between the remaining life values of different reliability levels corresponding to each value in each available attribute value, and obtaining the variance, sorting the available attribute values according to the variance value, and obtaining the influence degree ranking of the available attribute values.
[0030] As a preferred solution, it also includes: using the XGBoost model to build a machine learning model for predicting the life of smart electricity meters.
[0031] The electric energy meters of each cluster are obtained according to the value combination of the available attribute values, and the life span of the electric energy meters of each cluster is obtained, and the electric energy meters of each cluster and the corresponding life span are used as training samples.
[0032] The training samples are used to train the machine learning model for predicting the life of smart electricity meters, and the weight values of the machine learning model for predicting the life of smart electricity meters are obtained.
[0033] The weight value is adjusted according to the influence ranking of the available attribute values or the proportion of the number of electric energy meters in each cluster to obtain the adjusted weight value.
[0034] The adjusted weight values are substituted into the smart electricity meter life prediction machine learning model to obtain the trained smart electricity meter life prediction machine learning model.
[0035] As a preferred solution, the training samples use K-fold cross-validation to train and verify the smart electricity meter life prediction machine learning model.
[0036] As a preferred solution, the available attribute values are shown in Table 1.
[0037] Table 1 Available attribute values
[0038]
[0039]
[0040] As a preferred solution, the Weibull life distribution model includes: a distribution function of the current life of the smart electricity meter and a reliability function.
[0041] The distribution function of the current life of the smart energy meter is:
[0042]
[0043] Where t is the current lifespan. The current operating time of the smart energy meter is obtained by subtracting the commissioning date from the current date. m is the shape parameter, and η is the scale parameter.
[0044] Reliability function of the current life of the smart energy meter:
[0045] R(t)=1-F(t).
[0046] As a preferred solution, the distribution function of the remaining life of the smart energy meter is:
[0047]
[0048] Among them, F t (x) is the remaining life distribution function starting from the current life t, and x is the remaining life, which represents the continued running time.
[0049] The average predicted value E(t) of the current life of the smart meter is:
[0050]
[0051] Beneficial effects: The present invention provides a method and device for predicting the life of a smart electricity meter, which adopts the Weibull distribution concept to solve the parameters of the life distribution model, and predicts the life value of the smart electricity meter by calculating the current life and the remaining life, thereby improving the prediction accuracy. Clustering calculation is performed according to the attribute values of the smart electricity meter, thereby improving the prediction accuracy.
[0052] Secondly, by calculating and sorting the variance of the difference between the life values of clusters with different reliabilities, the attribute values that affect the degree of remaining life are obtained.
[0053] Finally, the present invention uses the XGBoost model to construct a machine learning model, which is then used to predict the lifespan of smart meters. Weights are assigned to the machine learning model based on the importance of the smart meter attributes or the proportion of smart meters in each cluster within the training sample, improving its prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 Flow chart of the steps of the method of the present invention. DETAILED DESCRIPTION
[0055] The present invention will be further described below with reference to specific embodiments.
[0056] like Figure 1 As shown, a method for predicting the life of a smart electric energy meter includes the following steps:
[0057] According to the attribute data and sorting detection data of the smart electricity meter, the data of the smart electricity meter with failure caused by the error of the non-smart electricity meter are eliminated, and the remaining data are the normal operation data of the smart electricity meter, that is, there is no failure data.
[0058] In the normal operation data of the smart electric energy meter, select an available attribute value in the attribute data.
[0059] According to the combination of different values in each available attribute value, the smart energy meter is divided into multiple clusters, and a corresponding Weibull life distribution model is constructed for each cluster.
[0060] According to the zero-failure data, the shape parameter and scale parameter of the constructed Weibull life distribution model are estimated using the maximum likelihood function, and the estimated values of the shape parameter and scale parameter are obtained.
[0061] According to the estimated values of shape parameters and scale parameters, the distribution function and reliability function of the current life of the smart electricity meter of the Weibull life distribution model are obtained.
[0062] According to the distribution function of the current life of the smart electric energy meter, the distribution function of the remaining life of the smart electric energy meter is obtained.
[0063] The average predicted value of the current life of the smart meter is obtained through the reliability function of the current life of the smart meter.
[0064] The remaining life prediction value of the smart meter is obtained through the distribution function of the remaining life of the smart meter.
[0065] The average predicted value of the current life of the smart meter is added to the predicted value of the remaining life of the smart meter to obtain the predicted value of the life of the smart meter.
[0066] A device for predicting the life of an intelligent electric energy meter includes the following modules:
[0067] No-failure data acquisition module: used to eliminate the smart energy meter data caused by errors of non-smart energy meters based on the attribute data of the smart energy meter and the sorting detection data, and the remaining data is the no-failure data.
[0068] Available attribute value acquisition module: used to select available attribute values in attribute data from non-failure data.
[0069] Weibull lifetime distribution model construction module: used to divide the smart electricity meter into multiple clusters according to the combination of different values in each available attribute value, and construct a corresponding Weibull lifetime distribution model for each cluster.
[0070] Parameter calculation module: used to estimate the shape parameter and scale parameter of the constructed Weibull life distribution model based on zero-failure data using the maximum likelihood function to obtain the estimated values of the shape parameter and scale parameter.
[0071] Current life acquisition module: used to obtain the distribution function and reliability function of the current life of the smart electricity meter of the Weibull life distribution model based on the estimated values of the shape parameter and scale parameter.
[0072] Remaining life acquisition module: used to obtain the distribution function of the remaining life of the smart energy meter based on the distribution function of the current life of the smart energy meter.
[0073] Current life prediction module: used to obtain the average predicted value of the current life of the smart meter through the reliability function of the current life of the smart meter.
[0074] Remaining life prediction module: used to obtain the predicted value of the remaining life of the smart meter through the distribution function of the remaining life of the smart meter.
[0075] The energy meter life prediction module is used to add the average predicted value of the current life of the smart meter to the predicted value of the remaining life of the smart meter to obtain the predicted value of the life of the smart meter.
[0076] Example 1:
[0077] Obtain available attribute values based on the attribute data of the smart electric energy meter.
[0078] There are 23 attributes of smart energy meters. The attribute values for the meter's own multiplier, pulse amplitude, frequency, usage, relay contacts, and user type remain unchanged, leaving 17 available attribute values. See Table 1 for details.
[0079] Table 1 Available attribute values
[0080]
[0081]
[0082] Each available attribute value is clustered according to the value.
[0083] Let's take the specifications of electric energy meters as an example for a detailed analysis. There are 11 different values for electric energy meter specifications, as shown in Table 2 below. We remove values with a total sorting volume of less than 90 units. After cleaning, we obtain seven values, and divide the electric energy meters into seven clusters based on these values.
[0084] Table 2 Electricity meter specifications and values
[0085] Value Total sorting volume 101 276246 115 161 121 173 126 3 129 131 130 1 131 39198 136 3 143 15 144 699 148 91
[0086] The Weibull life distribution model includes: the distribution function of the current life of the smart electricity meter and the reliability function.
[0087] The distribution function of the current life of the smart energy meter is:
[0088]
[0089] Where t is the current lifespan. The current operating time of the smart energy meter is obtained by subtracting the commissioning date from the current date. m is the shape parameter, and η is the scale parameter.
[0090] Reliability function of the current life of the smart energy meter:
[0091] R(t)=1-F(t)
[0092] The distribution function of the remaining life of the smart energy meter is:
[0093]
[0094] Among them, F t (x) is the remaining life distribution function starting from the current life t, and x is the remaining life, which represents the continued running time.
[0095] The average predicted value of the current life of the smart meter E(t):
[0096]
[0097] Example 2:
[0098] The “remaining life-reliability” verification with different values of the available attribute values can be used.
[0099] According to the reliability function curve, the following can be analyzed:
[0100] (1) Remaining life value corresponding to reliability of 0.9: This value measures the time it takes for the meter’s reliability to drop to 0.9. The longer the time, the longer the meter’s initial stability period.
[0101] (2) Remaining life value corresponding to reliability of 0.1: This value measures the time it takes for the reliability of the energy meter to drop to 0.1. The longer the time, the longer the stable operation time of the energy meter.
[0102] (3) The difference between the lifespan values corresponding to reliability levels of 0.1 and 0.9 measures the time it takes for the meter to fail. A shorter time indicates that the meter fails quickly; a longer time indicates that the meter fails gradually.
[0103] Based on the above three points, the reliability function analysis values of the electric energy meter specifications with basic error as the fault cause are as shown in Table 3, where the failure ratio is the ratio of electric energy meters with basic error faults to all faulty electric energy meters.
[0104] Table 3 Reliability function analysis table of electric energy meter specifications
[0105]
[0106]
[0107] The same analysis is performed for each usable attribute value. The difference in the lifespan of different clusters of electric energy meters under each usable attribute value can be obtained, thereby determining whether different usable attribute values have an impact on the remaining lifespan.
[0108] The variance of the difference between the lifetime values for each available attribute value is calculated, and available attribute values with a variance greater than 1 are considered important features affecting the remaining life of smart energy meters. It can be found that storage duration, chip manufacturer, communication protocol, meter specifications, and bidding batch have a significant impact on the remaining normal operation time.
[0109] Example 3:
[0110] A machine learning model for predicting the life of smart electricity meters was constructed. Since many available attribute values belong to categorical variables, and the XGBoost model has excellent performance in the industry, good handling of missing features, and robustness, the machine learning model selected for this modeling was the XGBoost model.
[0111] Because XGBoost is a tree model, numerical variables such as active accuracy level do not need to be standardized. Categorical variables such as unit category are encoded using one-hot encoding.
[0112] Based on the value combinations of 17 available attribute values, the smart energy meters are divided into 629 clusters. Therefore, 629 clusters of energy meters are constructed. The lifespan of the 629 clusters of energy meters obtained by the above prediction method is calculated, which is the data label and constitutes the training sample.
[0113] Since the number of energy meters in each cluster is inconsistent, the number of meters in a cluster represents the frequency of occurrence of the energy meters in that cluster. Energy meters with higher frequency should be given more importance. Therefore, energy meters in different clusters should not be treated equally in model training. Training samples are assigned corresponding weights based on the number of energy meters in the cluster.
[0114] When evaluating machine learning models, it is also necessary to reflect that if the life prediction error of a type of electricity meter used in large quantities is large, its weight will be further increased during the evaluation. Therefore, during the model verification phase, the life prediction error of the electricity meter needs to be weighted according to the type of electricity meter.
[0115] After cleaning the original data, there are 884,274 samples. After further extraction and processing, 629 stable samples were obtained. The total number of samples is relatively small. In order to maximize the number of training samples and the objectiveness of the validation error, K-fold cross-validation is used for model training and validation. The specific steps are as follows:
[0116] The 629 clusters of electricity meters were randomly divided into 10 equal groups, numbered 1, 2, 3, …, and 10. The first group of meters was used as validation data, and the remaining 9 groups were used as training data for model training. The second group was used as validation data, and the remaining 9 groups were used as training data, and so on. This way, all data contributed to both the training set and the validation set. Finally, the average error across the 10 validation groups was taken as the validation error.
[0117] The validation set validation error is calculated as follows:
[0118]
[0119] in:
[0120] Err——verification average error
[0121] ω j ——weight of the jth sample
[0122] n——Number of samples in the validation set
[0123] p j ——jth predicted value
[0124] t j ——jth true value
[0125] Through iterative optimization of the machine learning model, the model parameters were determined, resulting in an XGBoost prediction model. Prediction was performed on 100 electricity meters randomly selected from the validation set. Because real-world electricity meters may have varying degrees of missing attribute values, predictions were performed by randomly selecting 5%, 10%, 20%, and 30% of the attribute values in the validation set and setting them to null. The relationship between validation error and the degree of missing attribute values was examined. When there were no missing values, the average validation error was 1.21 years, and the error gradually increased with an increase in the number of missing values.
[0126] Based on the prediction model constructed in the above steps, the contribution of each feature to the auxiliary model's prediction was calculated. The machine learning model identified the top five contributing attributes as storage duration, chip manufacturer, communication protocol, meter specifications, and bidding batch. These five attributes are the most important factors affecting the lifespan of meters in different clusters.
[0127] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for predicting the life of a smart electric energy meter, characterized by: The steps include: According to the attribute data and sorting detection data of the smart energy meter, the data of the smart energy meter with failure caused by the error of the non-smart energy meter is eliminated, and the remaining data is the data without failure; Selecting available attribute values in the attribute data from the no-failure data; According to the combination of different values in each available attribute value, the smart energy meter is divided into multiple clusters, and a corresponding Weibull life distribution model is constructed for each cluster; Based on the zero-failure data, the shape parameter and scale parameter of the constructed Weibull life distribution model are estimated using the maximum likelihood function, and the estimated values of the shape parameter and scale parameter are obtained; According to the estimated values of shape parameters and scale parameters, the distribution function and reliability function of the current life of the smart electricity meter of the Weibull life distribution model are obtained; Obtaining a distribution function of the remaining life of the smart energy meter based on the distribution function of the current life of the smart energy meter; Obtain the average predicted value of the current life of the smart meter through the reliability function of the current life of the smart meter; Obtain the predicted value of the remaining life of the smart meter through the distribution function of the remaining life of the smart meter; The average predicted value of the current life of the smart meter is added to the predicted value of the remaining life of the smart meter to obtain the predicted value of the life of the smart meter; Calculate the difference between the remaining life values of different reliability levels corresponding to each value in each available attribute value, and calculate the variance. Then sort the available attribute values according to the variance value to obtain the influence ranking of the available attribute values. It also includes: using the XGBoost model to build a machine learning model for predicting the life of smart electricity meters; Obtain the energy meters of each cluster based on the combination of available attribute values, and obtain the life span of the energy meters of each cluster, and use the energy meters of each cluster and the corresponding life span as training samples; The training samples are used to train the machine learning model for predicting the life of smart electricity meters, and the weight values of the machine learning model for predicting the life of smart electricity meters are obtained; The weight value is adjusted according to the influence ranking of the available attribute values or the proportion of the number of electric energy meters in each cluster to obtain the adjusted weight value; The adjusted weight values are substituted into the smart electricity meter life prediction machine learning model to obtain the trained smart electricity meter life prediction machine learning model.
2. The method for predicting the life of a smart electric energy meter according to claim 1, characterized in that: The training samples use K-fold cross-validation to train and verify the smart electricity meter life prediction machine learning model.
3. The method for predicting the life of a smart electric energy meter according to claim 1, characterized in that: The available attribute values include: unit type, chip manufacturer, electricity meter voltage, wiring method, calibration current, meter mode, overload multiple, communication protocol, active power accuracy level, communication method, electricity meter constant, electricity meter specifications, manufacturing unit, bidding batch, indication type, storage time, and bearing structure.
4. The method for predicting the life of a smart electric energy meter according to claim 1, wherein: The Weibull life distribution model includes: a distribution function of the current life of the smart electric energy meter and a reliability function; The distribution function of the current life of the smart energy meter is: ; in, The current lifespan is obtained by subtracting the commissioning date from the current date to obtain the current operating time of the smart energy meter. is the shape parameter, is the scale parameter; Reliability function of the current life of the smart energy meter: 。 5. The method for predicting the life of a smart electric energy meter according to claim 4, characterized in that: The distribution function of the remaining life of the smart energy meter is: ; in, Current lifespan The remaining life distribution function at the beginning, Remaining life, indicating the time for continued operation.
6. The method for predicting the life of a smart electric energy meter according to claim 4, characterized in that: The average predicted value of the current life of the smart meter : 。 7. A device for predicting the life of a smart electric energy meter, characterized by: Includes the following modules: No-failure data acquisition module: used to remove the smart energy meter data with faults caused by errors of non-smart energy meters based on the attribute data of the smart energy meter and the sorting detection data, and the remaining data is the no-failure data; Available attribute value acquisition module: used to select available attribute values in attribute data from non-failure data; Weibull lifetime distribution model construction module: used to divide the smart energy meter into multiple clusters based on the different values of each available attribute value, and construct a corresponding Weibull lifetime distribution model for each cluster; Parameter calculation module: used to estimate the shape parameter and scale parameter of the constructed Weibull life distribution model based on zero-failure data using the maximum likelihood function to obtain the estimated values of the shape parameter and scale parameter; Current life acquisition module: used to obtain the distribution function and reliability function of the current life of the smart electricity meter of the Weibull life distribution model based on the estimated values of the shape parameters and scale parameters; Remaining life acquisition module: used to obtain the distribution function of the remaining life of the smart energy meter based on the distribution function of the current life of the smart energy meter; Current life prediction module: used to obtain the average predicted value of the current life of the smart meter through the reliability function of the current life of the smart meter; Remaining life prediction module: used to obtain the remaining life prediction value of the smart meter through the distribution function of the remaining life of the smart meter; Energy meter life prediction module: used to add the average predicted value of the current life of the smart meter to the predicted value of the remaining life of the smart meter to obtain the predicted value of the life of the smart meter; Machine learning module: used to build a machine learning model for predicting the life of smart electricity meters using the XGBoost model; Obtain the energy meters of each cluster based on the combination of available attribute values, and obtain the life span of the energy meters of each cluster, and use the energy meters of each cluster and the corresponding life span as training samples; The training samples are used to train the machine learning model for predicting the life of smart electricity meters, and the weight values of the machine learning model for predicting the life of smart electricity meters are obtained; The weight value is adjusted according to the influence ranking of the available attribute values or the proportion of the number of electric energy meters in each cluster to obtain the adjusted weight value; Substituting the adjusted weight values into the smart electricity meter life prediction machine learning model to obtain a trained smart electricity meter life prediction machine learning model; Calculate the difference between the remaining life values of different reliability levels corresponding to each value in each available attribute value, and obtain the variance. Then sort the available attribute values according to the variance value to obtain the influence ranking of the available attribute values.