Gate electric energy meter on-site electric energy metering error prediction method, system and medium

CN115471361BActive Publication Date: 2026-09-29STATE GRID HUNAN ELECTRIC POWER COMPANY LIMITED +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211123088.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-15
Publication Date
2026-09-29
Estimated Expiration
2042-09-15

AI Technical Summary

Benefits of technology

[0047]和现有技术相比,本发明主要具有下述优点:本发明包括针对多台关口电能表对应的测量误差数据集DP分别计算其中数据点的估计密度;基于估计密度计算用于表征数据点及其k个最近邻数据点密度差异的异常值因子;采用箱线图方法确定异常值因子的异常阈值,并根据异常阈值确定并删除测量误差数据集DP中异常的数据点,得到过滤后的测量误差数据集S′P;针对过滤后的测量误差数据集S′P采用核支持向量回归模型进行误差预测,得到关口电能表的误差结果。本发明能够融合测量误差和多个极端环境应力,具有更高的评估性能,在小样本条件下具有深刻的异常值识别和错误预测性能。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115471361B_ABST
    Figure CN115471361B_ABST
Patent Text Reader

Abstract

The application discloses a kind of field electric energy measurement error prediction method, system and medium of gateway electric energy meter, and the application includes corresponding measurement error dataset D P The estimated density of each data point is calculated respectively;Based on the estimated density, an outlier factor is calculated to represent the density difference of the data point and its k nearest neighbor data points;The outlier threshold of the outlier factor is determined by the box plot method, and the abnormal data points in the measurement error dataset D P Are determined and deleted according to the outlier threshold, to obtain the filtered measurement error dataset S' P ;For the filtered measurement error dataset S' P , an error prediction is performed using a kernel support vector regression model, and the error result of the gateway electric energy meter is obtained.The application can integrate measurement error and multiple extreme environmental stress, has higher evaluation performance, and has deep outlier identification and error prediction performance under small sample conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to metering error prediction technology for energy meters at checkpoints, specifically to a method, system, and medium for predicting on-site energy metering errors for energy meters at checkpoints. Background Technology

[0002] Electricity metering is the core of power company operations, with the value of electrical energy being reflected through metering devices. Gateway electricity meters refer to electricity meters installed and operating at key points in the power grid, such as power generation companies connecting to the grid, inter-regional interconnection lines, provincial grid interconnection lines, and intra-provincial grid connections. These meters are used for trade settlement and internal economic indicator assessment, playing a crucial role in the overall power grid's electricity metering. They typically have an accuracy of 0.2S, 0.5S, or 0.5, and all possess bidirectional metering capabilities, measuring active and reactive energy, peak, flat, valley, and peak demand, as well as data transmission functions. The accuracy of gateway electricity meter measurement directly impacts the economic interests of both power suppliers and consumers at these points.

[0003] Because there are many reasons for errors in electricity meters, such as light-load operation, excessive secondary voltage drop, meter tilt, and wiring errors, and because the relative error value only indicates whether the meter is accurate, existing field verification systems do not record the raw data of the meter's operation, thus lacking practical guidance for meter operation and maintenance. Therefore, how to achieve on-site prediction of electricity metering errors at key points has become a critical technical problem that urgently needs to be solved. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a method, system and medium for predicting on-site energy metering errors of gate energy meters, which can integrate measurement errors and multiple extreme environmental stresses, and has higher evaluation performance. It also has profound outlier identification and error prediction performance under small sample conditions.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0006] A method for predicting on-site energy metering errors in a gated energy meter includes:

[0007] S101, for the measurement error dataset D corresponding to multiple energy meters at the checkpoints. P Calculate the estimated density of each data point;

[0008] S102, based on the estimated density, calculate the outlier factor to characterize the density difference between a data point and its k nearest neighbor data points;

[0009] S103, use the box plot method to determine the outlier threshold of the outlier factor, and determine and delete the measurement error dataset D based on the outlier threshold. P The abnormal data points are used to obtain the filtered measurement error dataset S′. P ;

[0010] S104, for the filtered measurement error dataset S′ P Error prediction was performed using a kernel support vector regression model to obtain the error results of the gate electricity meter.

[0011] Optionally, the functional expression for calculating the estimated density of the data points in step S101 is:

[0012]

[0013] In the above formula, ρ(p) is the estimated density of data point p, |N k (p)| represents the k nearest neighbor data points N of data point p. k The size of (p), q j Let N be the k nearest neighbor data points of data point p. k In (p), the j-th data point, μ is the dimension of the multivariate Gaussian kernel, w is the width of the multivariate Gaussian kernel, and d(q j p) represents data point q j The squared Euclidean distance between the data point p and the data point p.

[0014] Optionally, the calculation function expression for the outlier factor in step S102 is:

[0015]

[0016] In the above formula, KDOF(p) is the outlier factor of the density difference between data point p and its k nearest neighbors, where data point p and its k nearest neighbors are all measurement error datasets D. P Data points in q j Let N be the k nearest neighbor data points of data point p. k The j-th data point in (p), DF(q) j ) represents data point q j The density fluctuation, DF(p) is the density fluctuation of data point p, |N k (p)| represents the k nearest neighbor data points N of data point p. k The magnitude of (p), and the expression for the calculation function of the density fluctuation of any data point p is:

[0017]

[0018] In the above formula, ρ(p) is the estimated density of data point p, and ρ(q) is the density of data point p. j ) represents data point qj The estimated density.

[0019] Optionally, the functional expression for determining the outlier threshold of the outlier factor using the box plot method in step S103 is as follows:

[0020]

[0021] In the above formula, T h The outlier threshold is T, where α is the influence factor, IQR is the interquartile range, and Q1 is the lower quartile of the outlier score; and the outlier factor of the outlier data points is greater than the outlier threshold T. h .

[0022] Optionally, in step S101, the measurement error dataset D P The function expression is:

[0023] D P ={(t,N a,b,c ,ε a,b,c )},

[0024] In the above formula, t is the statistical time of the measurement error of the gate energy meter, and N is the distance between the meter and the gate. a,b,c The stress ε is the stress measured by the a-th meter in month c at the b-th meter under the combined effects of temperature and humidity. a,b,c The error is obtained from the a-th measurement of the b-th energy meter in the c-th month; step S103 obtains the filtered measurement error dataset S′. P The function expression is:

[0025] S′ P ={(t,N a,b,c ,ε′ a,b,c )},

[0026] In the above formula, ε′ a,b,c Let be the error obtained from the a-th measurement of the b-th energy meter in the c-th month after filtering, where a = 1, 2, 3, ..., n, c = 1, 2, 3, ..., 12, and n is the number of measurements.

[0027] Optionally, in step S104, the filtered measurement error dataset S′ P Error prediction using a kernel support vector regression model includes:

[0028] S201, Select the kernel function for the kernel support vector regression model;

[0029] S202, the filtered measurement error dataset S′ P Statistical time t, stress N a,b,cThe kernel support vector regression model uses the input features as input features and establishes a weighted linear combination kernel based on temperature T, humidity H, and statistical time t based on the selected kernel function. Relaxation factors and constraint problems are introduced into the optimization problem of the kernel support vector regression model to establish the kernel support vector regression model to learn the decision plane for measurement error prediction. The dual Lagrangian function is introduced to transform the constraint problem into a dual problem. By solving the optimal solution of the dual problem, the parameters of the kernel support vector regression model are obtained.

[0030] S203 establishes a decision function for the kernel support vector regression model, specifically for the filtered measurement error dataset S′. P Error prediction is performed using a kernel support vector regression model, and the function expression for the decision function is as follows:

[0031]

[0032] In the above formula, f(v) is the error prediction value of data point v. For the optimal solution of the i-th measurement, α i For the solution of the i-th measurement, K c (v i (v) represents the weighted linear combination check data point pair (v) i The calculation result of v), where data point v i Let u be any i-th data point, and u be the deviation constant.

[0033] Optionally, the kernel function selected for the kernel support vector regression model in step S201 is a radial basis function.

[0034] Optionally, the functional expression of the weighted linear combination kernel based on temperature T, humidity H, and statistical time t established in step S202 is as follows:

[0035] K c (x a ,x b )=m1K T (T a ,T b )+m2K H (H a H b )+m3K t (t a ,t b )

[0036] In the above formula, K c (x a ,x b ) is the weighted linear combination kernel, m1~m3 are the weight factors of the kernel function, and K T (T a ,T bK is the kernel function corresponding to temperature T. H (H a H b ) represents the kernel function corresponding to humidity H, and K t (t a ,t b (x) is the kernel function corresponding to the statistical time t. a ,x b (T) represents two data points. a ,T b ) represents two data points (x a ,x b ) temperature, (H a H b ) represents two data points (x a ,x b The humidity of (t) a ,t b ) represents two data points (x a ,x b The statistical time of ); When introducing a relaxation factor for the optimization problem of the kernel support vector regression model in step S202, the functional expression of the relaxation factor is:

[0037] ξ * =[ξ1,ξ1 * ,...ξ n ,ξ n * ]∈R 2n

[0038] In the above formula, ξ * Let ξ1 and ξ2 be relaxation factors. * Let ξ be the slack variable from the first measurement, ξ be the slack variable from the first constraint application, and ξ be the slack variable from the first measurement. n and ξ n * Let R be the slack variable from the nth measurement, R be the slack variable from the nth constraint, and R be the slack variable from the nth measurement. 2n The functional expression for the optimization problem of a kernel support vector regression model with dimension 2n, where n is the number of measurements, and incorporating a relaxation factor, is as follows:

[0039]

[0040] In the above formula, ω is the weight vector, u is the deviation constant, h is the penalty coefficient, and ξ is the weight vector. i and ξ i * Let be the relaxation factor for the i-th measurement and the relaxation variable for the i-th constraint, respectively, and n be the number of measurements; the functional expression of the constraint problem introduced in step S202 is:

[0041]

[0042] In the above formula, ω is the weight vector, u is the bias constant, and h is the penalty coefficient. For the kernel feature space, x i and y i Let be the coordinates of the i-th data point; in step S202, the dual problem obtained by introducing the dual Lagrangian function to transform the constrained problem is expressed as follows:

[0043]

[0044] In the above formula, α (*) To obtain the optimal solution, For the optimal solution of the i-th measurement, α i The solution for the i-th measurement. For the optimal solution of the j-th measurement, α j For the solution of the j-th measurement, K c (x i ,x j ) is a weighted linear combination to check data point pairs (x i ,x j The calculation results are given by ε, where ε is the insensitivity parameter, h is the penalty coefficient, and n is the number of measurements.

[0045] Furthermore, the present invention also provides a field energy metering error prediction system for a gate energy meter, comprising a microprocessor and a memory interconnected thereto, wherein the microprocessor is programmed or configured to execute the field energy metering error prediction method for the gate energy meter.

[0046] Furthermore, the present invention also provides a computer-readable storage medium storing a computer program for being programmed or configured by a microprocessor to execute the on-site energy metering error prediction method of the gate energy meter.

[0047] Compared with the prior art, the present invention has the following main advantages: The present invention includes a measurement error dataset D corresponding to multiple energy meters at different points in the metering system. P Calculate the estimated density of each data point; calculate outlier factors based on the estimated density to characterize the density differences between each data point and its k nearest neighbors; determine the outlier threshold of the outlier factors using a box plot method; and determine and delete the measurement error dataset D based on the outlier threshold. P The abnormal data points are used to obtain the filtered measurement error dataset S′. P For the filtered measurement error dataset S′ PError prediction is performed using a kernel support vector regression model to obtain the error results for the gate energy meter. This invention can integrate measurement errors and multiple extreme environmental stresses, resulting in higher evaluation performance and profound outlier identification and error prediction capabilities under small sample conditions. Attached Figure Description

[0048] Figure 1 This is a schematic diagram of the basic process of the method in an embodiment of the present invention. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of the present invention clearer, the appendices in the embodiments of the present invention will be described below. Figure 1 The technical solutions in the embodiments of the present invention are clearly and completely described herein. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0050] like Figure 1 As shown, the on-site energy metering error prediction method for the gate energy meter in this embodiment includes:

[0051] S101, for the measurement error dataset D corresponding to multiple energy meters at the checkpoints. P Calculate the estimated density of each data point;

[0052] S102, based on the estimated density, calculate the outlier factor to characterize the density difference between a data point and its k nearest neighbor data points;

[0053] S103, use the box plot method to determine the outlier threshold of the outlier factor, and determine and delete the measurement error dataset D based on the outlier threshold. P The abnormal data points are used to obtain the filtered measurement error dataset S′. P ;

[0054] S104, for the filtered measurement error dataset S′ P Error prediction was performed using a kernel support vector regression model to obtain the error results of the gate electricity meter.

[0055] In this embodiment, the measurement error dataset D corresponding to multiple point energy meters (PMEs) is... PThe acquisition process includes collecting and integrating data using a data acquisition platform. Due to the inherent quality characteristics of electronic instruments, PME measurement errors are more prone to increase under extreme environmental stress. Extreme climatic conditions include temperature, humidity, and dry heat. The metrology function of the PME is performed by the metrology module, which uses a shunt to transmit the measured signal to the metrology chip. Because the shunt is made of metal, its resistance is unstable at high temperatures, which usually leads to increased measurement errors. In addition, humidity also affects the PME. Moisture can enter the integrated chip (IC) through its package gaps, potentially causing malfunctions. To investigate the impact of special environmental stresses on measurement errors, measurement error data from three PME companies were collected from the typical high-dry-heat environmental test site in Xinjiang (XJ), a typical natural environment test site in China. Compared to experimental environments, the PME in the natural environment test site experiences multiple stresses simultaneously, making the environment more realistic and complex. The three companies analyzed are denoted as A, B, and C, respectively. The Advanced Metrology Infrastructure (AMI) system for PMEs includes both General Packet Radio Service (GPRS) and the Internet for data transmission. The PME testing apparatus comprises a standard meter and a standard source. The standard source generates actual power consumption, while the standard meter calculates the measurement error of the PME based on equations. Furthermore, environmental information, including temperature and humidity, is measured by corresponding sensors; this information is collected using the AMI system.

[0056] The first step of the method in this embodiment is to estimate the density. Since no assumptions are made about the type of density, nonparametric kernel estimation is used to estimate the density of the objects. The original measurement error dataset is represented as D. P ={(t,N a,b,c ,ε a,b,c ,a=1,2,3,...n,b=1,2,3,c=1,2,3,…12)}, where t is the statistical time of PME measurement error, n represents the number of objects in the Euclidean space of attribute μ, and ε a,b,c This represents the a-th measurement error value for company b in month c. a,b,c It refers to two extreme environmental stresses, including high temperature and low humidity environments. The stress mainly refers to statistical time, temperature and humidity, and is a derivative of the dry heat characteristics of the reaction test bench.

[0057] Objects belonging to different versions of a component can also have different densities instead of being outliers. Therefore, within some model components, the density of normal points may be lower than that of outliers surrounding points from different model components. To evaluate the density of object locations in a given dataset, nonparametric kernel density estimation (KDE) is used. In the KDE technique, given n samples of dimension μ, the distribution density can be calculated as:

[0058]

[0059] In the above formula, ρ(p) is the distribution density, p is the data point, μ is the dimension, k is the parameter of the k nearest neighbor, and p i Let w be the i-th object in Euclidean space, and D be the kernel width. p The original measurement error dataset is given by:

[0060]

[0061] Let w be a kernel function with a kernel width of w, satisfying the following conditions:

[0062] ∫k(p)dp=1,

[0063] ∫pk(p)dp=0,

[0064] ∫p 2 k(p)dp>0,

[0065] In this embodiment, a multivariate Gaussian kernel feature with a dimension μ having zero mean and unit standard deviation is used:

[0066]

[0067] Among them, ||pp i || is point p and p i The Euclidean distance between them. To calculate the density over the region of data point p, use its k-nearest neighbor as the kernel instead of the dataset D. P All data points in the dataset. The reasons are: (i) Most real-world datasets typically have multiple clusters, which may be an inherent characteristic of the dataset. Using density estimation for the entire dataset would also miss local density differences, failing to identify local outliers. (ii) Outlier detection calculates a score for each data point; using the entire dataset could result in higher computational costs, i.e., O(n^2). 2 ), where n is the size of the dataset. Therefore, the expected density at position p is calculated as follows:

[0068]

[0069] In the above formula, N k (p) represents the k nearest neighbors of data point p, |N k (p)| is N k (p) The number of elements in the set. This is a kernel function with a width of w. In this embodiment, a multivariate Gaussian kernel function is used. The functional expression for calculating the estimated density (local density) of the data points in step S101 is as follows:

[0070]

[0071] In the above formula, ρ(p) is the estimated density of data point p, |N k (p)| represents the k nearest neighbor data points N of data point p. k The size of (p) (including nearest neighbor data points N) k (the quantity of p), q j Let N be the k nearest neighbor data points of data point p. l In (p), the j-th data point, μ is the dimension of the multivariate Gaussian kernel, w is the width of the multivariate Gaussian kernel, and d(q j p) represents data point q j The squared Euclidean distance between the data point p and the data point p is given by:

[0072] d(q j ,p)=||q j -p|| 2 .

[0073] Among them, the k nearest neighbor data points N of any data point p k The steps for generating (p) include: finding from p to q∈D P The sorting distance for all p∈D. P N(p) and N k (p) are all empty sets. For all q∈D P If p and q are not equal, then q is considered a neighbor of q and added to the dataset N(p). N(p) is then sorted in ascending order by dist(p,q); k Let d be the k-th neighbor of p. k (p) = dist(p,q) k For q∈N(p), if dist(p,q)≤d k (p) Then we consider q as a k-neighbor of p and add it to N. k (p) In this paper, the k value is a crucial KDOF parameter affecting outlier detection. The k range for the three companies was set to 2 to 11. Through a series of experiments, it was found that the outliers for A, B, and C reached their maximum values ​​when k = 3, 5, and 6, respectively. The higher the outlier, the more pronounced the anomaly. A KDOF threshold was set based on the distribution pattern of the measurement error data. Outlier scores exceeding the threshold T... h The data points were identified as outliers and then excluded. Thus, the outlier thresholds for companies A, B, and C can be set to 1.44, 2.56, and 3.48, respectively.

[0074] In this embodiment, the calculation function expression for the outlier factor in step S102 is as follows:

[0075]

[0076] In the above formula, KDOF(p) is the outlier factor of the density difference between data point p and its k nearest neighbors, where data point p and its k nearest neighbors are all measurement error datasets D. P Data points in q j Let N be the k nearest neighbor data points of data point p. k The j-th data point in (p), DF(q) j ) represents data point q j The density fluctuation, DF(p) is the density fluctuation of data point p, |N k (p)| represents the k nearest neighbor data points N of data point p. k The magnitude of (p), and the expression for the calculation function of the density fluctuation of any data point p is:

[0077]

[0078] In the above formula, ρ(p) is the estimated density of data point p, and ρ(q) is the density of data point p. j ) represents data point q j The estimated density.

[0079] Typically, a constant threshold can be defined to identify outliers. However, due to varying data distribution patterns, this may fail to distinguish between normal data and outliers with a constant threshold. Therefore, another improvement in KDOF is the adaptive setting of an appropriate outlier threshold using a box plot method. A box plot is a statistical method based on the interquartile range (IQR) and quartiles, reflecting the differences in the distribution of measurement error data. Note that a box plot is also an outlier identification method. However, it cannot reflect the correlation between measurement errors and other stresses. Therefore, instead of directly detecting measurement errors, a box plot is used to process the outlier dataset to adaptively set the threshold. After solving for outliers, the IQR can be expressed as:

[0080] IQR = Q3 - Q1

[0081] Where Q3 and Q1 are the upper and lower quartiles of the outlier scores, respectively. Therefore, in this embodiment, the functional expression for determining the outlier threshold of the outlier factor using the box plot method in step S103 is as follows:

[0082]

[0083] In the above formula, T h The outlier threshold is T, where α is the influence factor, IQR is the interquartile range, and Q1 is the lower quartile of the outlier score; and the outlier factor of the outlier data points is greater than the outlier threshold T. hExperiments revealed that when α = 1, the identified outliers might be misclassified as normal measurement errors due to the high tolerance. When α = 2, some minor outliers might be mistaken for normal data. To reduce data loss in small sample datasets, this invention sets α to 2.

[0084] In this embodiment, in S103, the measurement error dataset D is determined and deleted based on the abnormal threshold. P The function expression for the abnormal data points is:

[0085] Outlier(p(x p ,y p ))=KDOF(p)>T h ,

[0086] In the above formula, Outlier(p(x) p ,y p () indicates an abnormal data point. In this embodiment, the measurement error dataset D in step S101 P The function expression is:

[0087] D P ={(t,N a,b,c ,ε a,b,c )},

[0088] In the above formula, t is the statistical time of the measurement error of the gate energy meter, and N is the distance between the meter and the gate. a,b,c The stress ε is the stress measured by the a-th meter in month c at the b-th meter under the combined effects of temperature and humidity. a,b,c The error is obtained from the a-th measurement of the b-th energy meter in the c-th month; step S103 obtains the filtered measurement error dataset S′. P The function expression is:

[0089] S′ P ={(t,N a,b,c ,ε′ a,b,c )},

[0090] In the above formula, ε′ a,b,c Let be the error obtained from the a-th measurement of the b-th energy meter in the c-th month after filtering, where a = 1, 2, 3, ..., n, c = 1, 2, 3, ..., 12, and n is the number of measurements.

[0091] In this embodiment, step S104 involves the filtered measurement error dataset S′ P Error prediction using a kernel support vector regression model includes:

[0092] S201, Select the kernel function for the kernel support vector regression model;

[0093] S202, the filtered measurement error dataset S′ P Statistical time t, stress N a,b,c The kernel support vector regression model uses the input features as input features and establishes a weighted linear combination kernel based on temperature T, humidity H, and statistical time t based on the selected kernel function. Relaxation factors and constraint problems are introduced into the optimization problem of the kernel support vector regression model to establish the kernel support vector regression model to learn the decision plane for measurement error prediction. The dual Lagrangian function is introduced to transform the constraint problem into a dual problem. By solving the optimal solution of the dual problem, the parameters of the kernel support vector regression model are obtained.

[0094] S203 establishes a decision function for the kernel support vector regression model, specifically for the filtered measurement error dataset S′. P Error prediction is performed using a kernel support vector regression model, and the function expression for the decision function is as follows:

[0095]

[0096] In the above formula, f(v) is the error prediction value of data point v. For the optimal solution of the i-th measurement, α i For the solution of the i-th measurement, K c (v i (v) represents the weighted linear combination check data point pair (v) i The calculation result of v), where data point v i Let u be any i-th data point, and u be the deviation constant.

[0097] In this embodiment, the kernel function selected for the kernel support vector regression model in step S201 is the radial basis function (RBF). Choosing an appropriate kernel function is crucial; the RBF kernel is one of the most commonly used kernel functions for transforming data in SVR. Experiments show that the RBF kernel outperforms the polynomial kernel and the linear kernel. Therefore, this invention uses the RBF kernel function. A grid search is used to find the optimal combination, thereby determining the weight factors of the kernel function. Finally, the parameters of the RBF kernel are further determined. For two data points a(x... a ,y a ),b(x b ,y b )∈S′ P RBF kernel function K RBF (x a ,x b It can be described as:

[0098] K RBF (x a ,x b )=exp(-γ||x a -xb || 2 ),

[0099] Where γ>0 is the radius of the RBF kernel function, and γ is used to control the mapping result.

[0100] Choosing an appropriate kernel function is crucial for KSVR performance. Taking Company C's sample as an example, three commonly used kernel functions were selected to verify model performance: multinomial kernel, linear kernel, and RBF kernel. For fair comparison, the penalty coefficient c was set to be the same. The comparison results of different kernel functions are shown in Table 1.

[0101] Table 1: Performance under different combinations of kernel functions.

[0102]

[0103] As shown in Table 1, the RBF and polynomial kernels outperform the linear kernel. Furthermore, the polynomial kernel performs worse than the RBF kernel. For example, when all kernel functions are set to polynomial and RBF kernels respectively, the root mean square error (RMSE) is 0.0901 and 0.0548. Additionally, the weighting factor for temperature feature m1 should have a higher value than m2 and m3. For simplicity, all kernel functions in the remaining parts of this embodiment are set to the RBF kernel function. As shown in Table 1, different weighting factors have different root mean square errors. For example, when m1 = 0.60, m2 = 0.30, and m3 = 0.10, the RMSE is 0.0526. In another case, when m1 = 0.70, m2 = 0.25, and m3 = 0.05, the RMSE is 0.0419. This means that the weighting factor directly affects the prediction accuracy of the proposed KSVR. Considering that the sum of the weighting factors is 1, a grid search is used to find the optimal combination of weighting factors for the kernel function. For example, when m1 = 0.60, m2 can be set from 0 to 0.40 with a step size of 0.01, then m3 = 1 - m1 - m2. Through grid search, the optimal m2 and m3 with the lowest RMSE when m1 = 0.6 can be found. Then, m1 is changed from 0 to 1 with the same step size of 0.01, and each m1 has an optimal m2 and m3. Finally, the optimal weighting factors are set to m1 = 0.80, m2 = 0.15, and m3 = 0.05, with a minimum RMSE of 0.0416. After determining the weighting factors, the parameters of the RBF kernel need to be further determined. Based on experimental results, the RBF kernel K... t The radius γ is set to a constant of 5.1. The penalty coefficient c is set to 1000. When γ T In the range of 2 to 7, RMSE changes with parameter γ. T It decreases as the value increases. Conversely, the parameter γ... H Negative correlation with prediction. In γ T=7 and γ H The lowest RMSE was obtained when γ = 2.5. Further fine-tuning of the parameters was performed, and then γ was chosen for the kernel function. T =7.2 and γ H =2.3.

[0104] In this embodiment, the function expression of the weighted linear combination kernel based on temperature T, humidity H, and statistical time t established in step S202 is as follows:

[0105] K c (x a ,x b )=m1K T (T a ,T b )+m2K H (H a H b )+m3K t (t a ,t b )

[0106] In the above formula, K c (x a ,x b K is a weighted linear combination kernel, where m1 to m3 are the weight factors of the kernel function (and m1 + m2 + m3 = 1), and K T (T a ,T b K is the kernel function corresponding to temperature T. H (H a H b ) represents the kernel function corresponding to humidity H, and K t (t a ,t b (x) is the kernel function corresponding to the statistical time t. a ,x b (T) represents two data points. a ,T b ) represents two data points (x a ,x b ) temperature, (H a H b ) represents two data points (x a ,x b The humidity of (t) a ,t b ) represents two data points (x a ,x b The statistical time of ); When introducing a relaxation factor for the optimization problem of the kernel support vector regression model in step S202, the functional expression of the relaxation factor is:

[0107] ξ *=[ξ1,ξ1 * ,...ξ n ,ξ n * ]∈R 2n

[0108] In the above formula, ξ * Let ξ1 and ξ2 be relaxation factors. * Let ξ be the slack variable from the first measurement, ξ be the slack variable from the first constraint application, and ξ be the slack variable from the first measurement. n and ξ n * Let R be the slack variable from the nth measurement, R be the slack variable from the nth constraint, and R be the slack variable from the nth measurement. 2n The functional expression for the optimization problem of a kernel support vector regression model with dimension 2n, where n is the number of measurements, and incorporating a relaxation factor, is as follows:

[0109]

[0110] In the above formula, ω is the weight vector, u is the bias constant, h is the penalty coefficient (greater than 0, reflecting the tolerance of model error), and ξ i and ξ i * Let be the relaxation factor for the i-th measurement and the relaxation variable for the i-th constraint, respectively, and n be the number of measurements; the functional expression of the constraint problem introduced in step S202 is:

[0111]

[0112] In the above formula, ω is the weight vector, u is the bias constant, and h is the penalty coefficient. For the kernel feature space, x i and y i Let be the coordinates of the i-th data point; in step S202, the dual problem obtained by introducing the dual Lagrangian function to transform the constrained problem is expressed as follows:

[0113]

[0114] In the above formula, α (*) To obtain the optimal solution, For the optimal solution of the i-th measurement, α i The solution for the i-th measurement. For the optimal solution of the j-th measurement, α j For the solution of the j-th measurement, K c (x i ,x j ) is a weighted linear combination to check data point pairs (x i ,x jThe calculation results are given, where ε is the insensitive parameter (greater than 0), h is the penalty coefficient, and n is the number of measurements. After solving the optimal solution α(*) of the dual problem, the parameters of the proposed KSVR model can be obtained. In this embodiment, 80% of the dataset is used for training and 20% for testing. The training implementation is based on the libSVM framework, and the corresponding CPU hardware platform is Intel(R) Core(TM) i5-11400H. The error prediction model (KDOF-KSVR) of this embodiment, which has been optimally trained, is tested using test set data. Experiments show that the execution time of the error prediction model (KDOF-KSVR) of this embodiment is 68.7ms, which means that KSVR can increase the execution time while improving prediction accuracy. In addition, the execution time of the error prediction model (KDOF-KSVR) of this embodiment is lower than that of other prediction models, indicating that the error prediction model (KDOF-KSVR) of this embodiment has strong computational performance. Overall, the error prediction model (KDOF-KSVR) of this embodiment is more suitable for measurement error prediction under small sample conditions.

[0115] In summary, to mitigate the impact of outliers on measurement error prediction, an outlier factor (KDOF) based on relative kernel density is introduced to measure the degree of outlier score for each data point in a given dataset. Nonparametric kernel density estimation (KDE) is used to assess the density of object locations in a given dataset, and a boxplot method is used to adaptively set a threshold. Outliers are then excluded based on both the outlier and the threshold. To establish the relationship between multiple stress features and measurement error, a composite kernel function is proposed, forming a novel kernel support vector regression (KSVR) for measurement error prediction. Specifically, different stress features can be mapped to different kernel spaces to achieve multi-feature fusion. Further PME measurement error assessment analysis based on KDOF and KSVR, considering both unavoidable outliers and multiple stress information in the sample, quantitatively provides the degree of influence of different stresses. Examples from extreme environmental regions demonstrate that the prediction method proposed in this embodiment has higher evaluation performance. Compared with several existing state-of-the-art prediction methods, the prediction method proposed in this embodiment exhibits profound outlier identification and error prediction performance under small sample conditions, and can simultaneously consider unavoidable outliers and multiple stress information in the sample.

[0116] Furthermore, the present invention provides a field energy metering error prediction system for a gated energy meter, comprising a microprocessor and a memory interconnected thereto, wherein the microprocessor is programmed or configured to execute the aforementioned field energy metering error prediction method for a gated energy meter. Additionally, the present invention provides a computer-readable storage medium storing a computer program for being programmed or configured by a microprocessor to execute the aforementioned field energy metering error prediction method for a gated energy meter.

[0117] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0118] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principle of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A method for predicting on-site energy metering errors in a gated energy meter, characterized in that, include: S101, for the measurement error dataset corresponding to multiple energy meters at the checkpoint Calculate the estimated density of each data point; S102, based on the estimated density, calculate the outlier factor to characterize the density difference between a data point and its k nearest neighbor data points; S103, use the box plot method to determine the outlier threshold of the outlier factor, and determine and delete the measurement error dataset based on the outlier threshold. By identifying anomalous data points, a filtered measurement error dataset is obtained. ; S104, for the filtered measurement error dataset Error prediction was performed using a kernel support vector regression model to obtain the error results of the gate electricity meter; The functional expression for calculating the estimated density of the data points in step S101 is as follows: , In the above formula, For data points The estimated density, For data points k nearest neighbor data points Size, For data points k nearest neighbor data points The first in j Data points, For the dimensions of the multivariate Gaussian kernel, The width of the multivariate Gaussian kernel, For data points and data points The square Euclidean distance between them; The function expression for calculating the outlier factor in step S102 is as follows: , In the above formula, For data points Outlier factors of the density differences of its k nearest neighbors, data points The k nearest neighbors are all measurement error datasets. Data points in For data points k nearest neighbor data points The first in j Data points, For data points Density fluctuations, For data points Density fluctuations, For data points k nearest neighbor data points The size of, and any data point The expression for the calculation function of density fluctuation is: , In the above formula, For data points The estimated density, For data points The estimated density; The functional expression for determining the outlier threshold of the outlier factor using the box plot method in step S103 is as follows: , In the above formula, The outlier threshold for the outlier factor. As the impact factor, Interquartile range, It is the lower quartile of the outlier score; and the outlier factor of the outlier data points is greater than the outlier threshold. .

2. The method for predicting on-site energy metering errors of a gate energy meter according to claim 1, characterized in that, Measurement error dataset in step S101 The function expression is: , In the above formula, t The statistical time for the measurement error of the electricity meter at the checkpoint. The stress measured by the a-th time in month c of the b-th energy meter under the combined effects of temperature and humidity. The error is obtained from the a-th measurement of the b-th energy meter in the c-th month; step S103 obtains the filtered measurement error dataset. The function expression is: , In the above formula, The error is the result of the a-th measurement of the b-th energy meter in the c-th month after filtering. , c =1,2,3,…,12, n For the number of times measured.

3. The method for predicting on-site energy metering errors of a gate energy meter according to claim 2, characterized in that, In step S104, the filtered measurement error dataset is processed. Error prediction using a kernel support vector regression model includes: S201, Select the kernel function for the kernel support vector regression model; S202, the filtered measurement error dataset Statistical time in t ,stress The kernel support vector regression model uses the input features as input features and establishes a weighted linear combination kernel based on temperature T, humidity H, and statistical time t based on the selected kernel function. The optimization problem of the kernel support vector regression model is introduced with relaxation factors and constraint problems to establish the kernel support vector regression model to learn the decision plane for measurement error prediction. The dual Lagrangian function is introduced to transform the constraint problem into a dual problem. The parameters of the kernel support vector regression model are obtained by solving the optimal solution of the dual problem. S203 establishes a decision function for the kernel support vector regression model, specifically for the filtered measurement error dataset. Error prediction is performed using a kernel support vector regression model, and the function expression for the decision function is as follows: , In the above formula, For data points The error prediction value, For the first i The optimal solution for this measurement. For the first i The solution for the second measurement, Check data point pairs for weighted linear combination The calculation results, including data points For any i-th data point, This is the deviation constant.

4. The method for predicting on-site energy metering errors of a gate energy meter according to claim 3, characterized in that, In step S201, the kernel function selected for the kernel support vector regression model is the radial basis function.

5. The method for predicting on-site energy metering errors of a gate energy meter according to claim 3, characterized in that, The functional expression for the weighted linear combination kernel based on temperature T, humidity H, and statistical time t established in step S202 is as follows: K c ( x a ,x b )= m 1 K T ( T a ,T b )+ m 2 K H ( H a ,H b )+ m 3 K t ( t a ,t b ) In the above formula, K c ( x a ,x b ) is the weighted linear combination kernel, m 1~ m 3 is the weighting factor of the kernel function. K T ( T a ,T b ) represents the kernel function corresponding to temperature T. K H ( H a ,H b ) is the kernel function corresponding to humidity H. K t ( t a ,t b ) is the kernel function corresponding to the statistical time t, ( x a ,x b ) represents two data points, ( T a ,T b ) for two data points ( x a ,x b ) temperature, ( H a ,H b ) for two data points ( x a ,x b ) humidity, ( t a ,t b ) for two data points ( x a ,x b The statistical time period; In step S202, when introducing a relaxation factor for the optimization problem of the kernel support vector regression model, the functional expression for the relaxation factor is: ξ * = [ ξ 1 ,ξ 1 * ,...ξ n ,ξ n * ] ∈R 2n In the above formula, ξ * As a relaxation factor, ξ 1 and ξ 1 * These are the slack variables from the first measurement and the slack variables from the first time constraints were applied, respectively. ξ n and ξ n * The first n The slack variable of the measurement, the first n The slack variables that are constrained in the next step. R 2n Representing a dimension of 2 n , n To measure the number of times, the functional expression for the optimization problem of the kernel support vector regression model with introduced relaxation factors is as follows: , In the above formula, ω For weight vectors, The deviation constant is h The penalty coefficient is... ξ i and ξ i * The relaxation factor for the i-th measurement and the relaxation factor for the i-th measurement are respectively. i The slack variables that are constrained in the next step. n The number of measurements; the functional expression of the constraint problem introduced in step S202 is: , In the above formula, ω For weight vectors, The deviation constant is h The penalty coefficient is... For the kernel feature space, and The first i The coordinates of the data points; the function expression of the dual problem obtained by introducing the dual Lagrangian function to transform the constrained problem in step S202 is: , In the above formula, α ( ) To obtain the optimal solution, For the first i The optimal solution for this measurement. For the first i The solution for the second measurement, For the first j The optimal solution for this measurement. For the first j The solution for the second measurement, Check data point pairs for weighted linear combination The calculation results For insensitive parameters, h The penalty coefficient is... n For the number of times measured.

6. A field energy metering error prediction system for a gated energy meter, comprising a microprocessor and a memory interconnected, characterized in that, The microprocessor is programmed or configured to execute the on-site energy metering error prediction method for the gate energy meter according to any one of claims 1 to 5.

7. A computer-readable storage medium storing a computer program, characterized in that, The computer program is used to be programmed or configured by a microprocessor to execute the on-site energy metering error prediction method for the gate energy meter according to any one of claims 1 to 5.