A method for monitoring metering errors in charging guns based on energy routers
By dynamically adjusting the window width and using weighted processing, the problem of unreasonable window width determination in charging gun metering error monitoring was solved, enabling high-precision solution of charging gun error coefficient and accurate identification of abnormal charging guns.
Patent Information
- Application Number
- CN202411707238.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-11-27
AI Technical Summary
In existing technologies for monitoring metering errors in charging guns, unreasonable initial window width determination leads to small cumulative power values, affecting the accuracy of error coefficient calculation, and fails to effectively handle the differences in importance of sample data after each sliding window.
By dynamically adjusting the window width based on the initial window and combining it with weighted processing, the accumulated power is ensured to be no less than the minimum target power. Different weights are assigned to each sliding window position. The 3σ principle is used to identify outliers, eliminate abnormal data, and establish a linear model to solve the charging gun error coefficient.
It achieves high-precision solution of charging gun error coefficient, ensures accurate detection of abnormal charging guns, and improves the accuracy of measurement error monitoring.
Smart Images

Figure CN119471038B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity metering technology, and in particular to a method for monitoring metering errors of charging guns based on an energy router. Background Technology
[0002] With the development of technology, the application scenarios of charging guns are constantly expanding, and their metering function is becoming increasingly crucial. Accurate metering by charging guns helps in electricity bill collection, ensuring fairness and impartiality between power companies and users. In the new energy industry, charging guns need to be inspected regularly to ensure their accurate and stable operation.
[0003] Sampling data at 15-minute intervals allows for monitoring of grid current, voltage, and power at a finer time granularity, facilitating the use of big data analytics to identify abnormal electricity consumption by users. However, the small numerical values and numerous zero values in the 15-minute interval sampling data can interfere with the accurate calculation of the charging gun error coefficient. To address this, a sliding window algorithm is used to sum the electricity data at 15-minute intervals, improving data quality. Considering practical application scenarios, the importance of each set of sample data after sliding window summation varies; existing methods that ignore sample data confidence and directly perform averaging are insufficient to obtain accurate charging gun error coefficients.
[0004] In response, patent application CN118818141A discloses a method for monitoring charging gun metering errors based on an energy router. This method calculates the line loss rate using node sampling data at 15-minute intervals, and then processes outliers using the 3σ principle. An adaptive cumulative sliding window approach is then employed to sum the original electricity data. Furthermore, considering the varying importance of samples after each sliding window in practical applications, weights are assigned to the sampled data after the sliding window to improve the accuracy of the charging gun error coefficient calculation. However, this method's approach of determining the cumulative window width based on the proportion of low loads within the initial window does not achieve its intended purpose: if the low-load electricity is before the initial window, the accumulated electricity may still be very small, failing to achieve the desired sliding window accumulation effect. Summary of the Invention
[0005] This invention addresses the shortcomings and defects of existing technologies by providing a charging gun metering error monitoring method based on an energy router. The method determines the window width based on an accumulation method on the basis of the initial window, so that the accumulated power will not be small from the source, and achieves randomness in each accumulated power value (the accumulated power of the initial window at different positions is different).
[0006] The objective of this invention can be achieved through the following technical solutions.
[0007] A method for monitoring metering errors in charging guns based on an energy router includes the following steps:
[0008] Step 1: Obtain the power data of the charging gun and energy router based on the charging station's information.
[0009] Step 2: Calculate the line loss and line loss rate of the charging station based on the power data of the charging gun and the energy router;
[0010] Step 3: Identify abnormal points in line loss rate using the 3σ principle and remove the corresponding charging gun and energy router power data;
[0011] Step 4: Window the processed power data and then weight the windowed data.
[0012] Step 4-1, initialize the maximum window width. max Minimum target battery level Tmin, window position pos=1, sliding step size step=1, target window width window new =1;
[0013] Step 4-2: Using the data from the first energy router as the starting point of the sliding window, capture the window... max The observation area consists of 1 sample point, with a range of [pos, pos+window]. max -1];
[0014] Step 4-3, determine the target charge CUMpos when the window position is pos:
[0015]
[0016] Where x i-all For all charging guns in the i-th sample;
[0017] Step 4-4, if CUMpos does not exceed Tmin, then window max ×c, until CUMpos is greater than Tmin;
[0018] Where c is the window width expansion coefficient;
[0019] Steps 4-5: Determine the target window width:
[0020] Will be satisfied for the first time window width new1 Value as target window width new ;
[0021] Where η represents the target power coefficient; window new1 Increment by 1;
[0022] Steps 4-6: Sum the data from the charging gun and energy router inside the window:
[0023]
[0024] Where, x i-all For all charging guns in the i-th sample, y i Let x′ be the power data of the i-th sample energy router. k For the summed charging gun data, y′ k The summed energy router data;
[0025] Steps 4-7: Update the sliding window position. The position update formula is as follows:
[0026] pos = pos + step;
[0027] Steps 4-8, when the sliding window moves to the last window max When positioning, pos+window max -1 = m1, where m1 is the number of charging station samples after removing outliers;
[0028] The calculation is performed by directly summing up the Window_max points;
[0029] Steps 4-9: Update the number of charging station samples to m2;
[0030] Where m2 = m1 - Window max +1;
[0031] Steps 4-10: Calculate the weight ω of the electricity data after sliding windowing. k ;
[0032]
[0033] Where k represents the cumulative sample point index, 1≤k≤m2;
[0034] Step 4-11, assign weights ω k The formula for assigning values to the battery data after the sliding window is as follows;
[0035] "′
[0036] x k =w k ·x k ;
[0037] "′
[0038] y k =w k ·y k ;
[0039] Where, xk "、y k "This refers to the weighted power data of the charging gun and energy router."
[0040] Step 5: Based on the constructed weighted data, establish a linear model to solve the charging gun error coefficient and monitor the charging gun measurement error.
[0041] Preferably, the formula for calculating the line loss rate of the charging station in step 2 is as follows:
[0042]
[0043] Among them, y i Let x be the power data of the i-th sample energy router, 1≤i≤m0, where m0 is the number of charging station samples, and x is the power data of the i-th sample energy router. ij Let lr be the power data of the j-th charging gun in the i-th sample. i Let n be the line loss rate corresponding to the i-th sample, and n0 be the number of charging guns.
[0044] Preferably, the specific process of step 3 is as follows:
[0045] A1, calculate the mean μ of the overall distribution of line loss rate;
[0046]
[0047] Among them, lr i Let m0 be the line loss rate corresponding to the i-th sample, and m0 be the number of charging station samples.
[0048] A2, calculate the variance σ of the overall distribution of line loss rate;
[0049]
[0050] A3, Calculate the upper limit of the line loss rate lr according to the 3σ principle. up ;
[0051] lr up =μ+3σ;
[0052] A4, Calculate the lower limit of line loss rate lr according to the 3σ principle. down ;
[0053] lr down =μ-3σ;
[0054] A5. Based on the upper and lower limits of the line loss rate, outlier detection is performed. The outlier detection formula is as follows:
[0055]
[0056] Among them, sgn=1 is identified as an outlier;
[0057] A6: Based on the identified anomalies, remove the corresponding charging gun and power router power data.
[0058] Preferably, the process of establishing a linear model and solving for the charging gun error coefficient in step 5 is as follows;
[0059] C1, calculate line loss;
[0060]
[0061] in, x is the line loss of the k-th sample; kj "This refers to the weighted power data of the j-th charging gun in the k-th sample;
[0062] C2, Establish a linear model;
[0063]
[0064] Where β is the charging gun error coefficient, and the subscript is the charging gun number, ranging from 1 to n; δ is other losses in the line; and α is the energy router metering error coefficient.
[0065] C3, solve for the charging gun error coefficient β;
[0066] β=(X T X+λE) -1 X T Error;
[0067] Where, matrix X = [x1″, x2″, ..., x n ",y",1]; λ is the regularization parameter; y” is the accumulated m2 energy router power data vectors.
[0068] Preferably, λ is 1.
[0069] Preferably, window max =48.
[0070] Preferably, η is 0.8.
[0071] Preferably, Tmin is 10 kWh.
[0072] Preferably, c is 2, 3, or 4.
[0073] The beneficial technical effects of this invention are as follows: the window width is determined based on the accumulation method on the basis of the initial window, so that the accumulated power will not be small from the source, and the accumulated power value of each accumulated power value is random (the accumulated power of the initial window at different positions is different), which truly ensures the accuracy of solving the charging gun error coefficient, and thus ensures the accurate detection of abnormal charging guns. Attached Figure Description
[0074] Figure 1 This is the overall flowchart of the present invention.
[0075] Figure 2 This is a diagram showing the detection of abnormal points in line loss rate in an embodiment of the present invention.
[0076] Figure 3 This is a comparison chart showing the results of solving the charging gun error coefficient using the method described in this embodiment of the invention and the patent described in the background art. Detailed Implementation
[0077] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and do not limit the scope of the invention.
[0078] Example: Figure 1 As shown, a method for monitoring metering errors of charging guns based on an energy router includes the following steps.
[0079] Step 1: Obtain 10 days of power data for the charging gun and energy router based on the charging station's records.
[0080] Step 2: Calculate the line loss and line loss rate of the charging station based on the power data of the charging gun and the energy router.
[0081]
[0082] Among them, y i The data represents the power consumption of the i-th sample energy router, where 1 ≤ i ≤ m0, and m0 is the number of charging station samples, which is 960 in this example. ij Let lr be the power data of the j-th charging gun in the i-th sample. i Let n be the line loss rate corresponding to the i-th sample, and n0 be the number of charging guns, which is 8 in the example.
[0083] Step 3: Identify abnormal points in line loss rate using the 3σ principle and remove the corresponding charging gun and energy router power data.
[0084] A1, calculate the mean μ of the overall distribution of line loss rate.
[0085]
[0086] Where lri is the line loss rate corresponding to the i-th sample, and m0 is the number of charging station samples.
[0087] A2, calculate the variance σ of the overall distribution of line loss rate.
[0088]
[0089] A3, Calculate the upper limit of the line loss rate lr according to the 3σ principle. up .
[0090] lr up =μ+3σ.
[0091] A4, Calculate the lower limit of line loss rate lr according to the 3σ principle. down .
[0092] lr down =μ-3σ.
[0093] A5. Based on the upper and lower limits of the line loss rate, anomaly point identification is performed. The identification formula is as follows.
[0094]
[0095] When sgn=1, it is identified as an anomaly.
[0096] A6, based on the identified anomalies, remove the corresponding power data for the charging gun and energy router, such as... Figure 2 The position indicated by the black asterisk (*).
[0097] Step 4: Window the processed power data and then weight the windowed data.
[0098] Step 4-1, initialize the maximum window width. max =48, Minimum target energy Tmin = 10kWh, Window position pos = 1, Sliding step size step = 1, Target window width window new =1;
[0099] Step 4-2: Using the data from the first energy router as the starting point of the sliding window, capture the window... max The observation area consists of 1 sample point, with a range of [pos, pos+window]. max -1];
[0100] Step 4-3, determine the target charge CUMpos when the window position is pos:
[0101]
[0102] Where x i-all For all charging guns in the i-th sample;
[0103] Step 4-4, if CUMpos does not exceed Tmin, then window max ×c, until CUMpos is greater than Tmin;
[0104] Where c is the window width expansion coefficient, and in the embodiment, a maximum value of 2 is generally sufficient.
[0105] Steps 4-5: Determine the target window width:
[0106] Will be satisfied for the first time window width new1 Value as target window width new ;
[0107] Where η represents the target power coefficient, set to 0.8; window new1 Increment by 1;
[0108] Steps 4-6: Sum the data from the charging gun and energy router inside the window:
[0109]
[0110] Where, x i-all For all charging guns in the i-th sample, y i Let x′ be the power data of the i-th sample energy router. k For the summed charging gun data, y′ k The summed energy router data;
[0111] Steps 4-7: Update the sliding window position. The position update formula is as follows:
[0112] pos = pos + step;
[0113] Steps 4-8, when the sliding window moves to the last window max When positioning, pos+window max -1 = m1, where m1 is the number of charging station samples after removing outliers, which is 921;
[0114] The calculation is performed by directly summing up the Window_max points;
[0115] Steps 4-9: Update the number of charging station samples to m2 = 904;
[0116] Steps 4-10: Calculate the weight ω of the electricity data after sliding windowing. k ;
[0117]
[0118] Where k represents the cumulative sample point index, 1≤k≤m2;
[0119] Step 4-11, assign weights ω k The formula for assigning values to the battery data after the sliding window is as follows;
[0120] "′
[0121] x k =w k ·x k ;
[0122] "′
[0123] y k =w k ·y k ;
[0124] Where, x k "、y k "This refers to the weighted power data of the charging gun and energy router."
[0125] Step 5: Based on the constructed weighted cumulative data, establish a linear model to solve the charging gun error coefficient and monitor the charging gun measurement error.
[0126] The process of establishing a linear model to solve for the charging gun error coefficient is as follows.
[0127] C1, calculate line loss.
[0128]
[0129] in, x is the line loss of the k-th sample; kj "" represents the power data of the j-th charging gun in the k-th sample after weighting.
[0130] C2, Establish a linear model.
[0131]
[0132] Where β is the charging gun error coefficient, and the subscript is the charging gun number, ranging from 1 to n; δ is other losses in the line; and α is the energy router metering error coefficient.
[0133] C3, solve for the charging gun error coefficient β.
[0134] β=(X T X+λE) -1 X T Error.
[0135] Where, matrix X = [x1″, x2″, ..., x n ",y",1]; λ is the regularization parameter, which is set to 1 in this example; y” is the accumulated power data vector of the energy router.
[0136] The tolerance for the charging gun with the designation 6 is set at -7%. The metering error of other charging guns, after calibration using professional equipment, is within ±0.6%. Figure 3 It can be seen that, for the modeling and solution of power data before and after the improved sliding window, when the charging gun's out-of-tolerance value is small, the error coefficient of the original sliding window solution deviates from the normal range of ±0.02, resulting in poor solution performance for the charging gun's out-of-tolerance value. In contrast, the error coefficient of the improved sliding window solution is distributed within the normal range of ±0.02, and the solution for the charging gun's out-of-tolerance value is closer to the set value. Therefore, by effectively accumulating the 15-minute interval sampling data of the nodes after the sliding window, the accuracy of the charging gun error coefficient solution is further improved, ensuring accurate detection of abnormal nodes.
[0137] The above embodiments are descriptions of specific implementations of the present invention, and not limitations thereof. Those skilled in the art can make various modifications and changes without departing from the spirit and scope of the present invention to obtain corresponding equivalent technical solutions. Therefore, all equivalent technical solutions should be included in the patent protection scope of the present invention.
Claims
1. A method for monitoring metering errors in charging guns based on an energy router, characterized in that, Includes the following steps: Step 1: Obtain the power data of the charging gun and energy router based on the charging station's information. Step 2: Calculate the line loss and line loss rate of the charging station based on the power data of the charging gun and the energy router; Step 3: Identify abnormal points in line loss rate using the 3σ principle and remove the corresponding charging gun and energy router power data; Step 4: Window the processed power data and then weight the windowed data. Step 4-1, initialize the maximum window width. max Minimum target charge Tmin, window position pos = 1, sliding step size step = 1; Step 4-2: Using the data from the first energy router as the starting point of the sliding window, capture the window... max The observation area consists of 1 sample point, with a range of [pos, pos+window]. max -1]; Step 4-3, determine the target charge CUMpos when the window position is pos: Where x i-all For all charging guns in the i-th sample; Step 4-4, if CUMpos does not exceed Tmin, then window max ×c, until CUMpos is greater than Tmin; Where c is the window width expansion coefficient; Steps 4-5: Determine the target window width: Will be satisfied for the first time window width new1 Value as target window width new ; in η represents the target power coefficient; window new1 Increment by 1; Steps 4-6: Sum the data from the charging gun and energy router inside the window: Where, x i-all For all charging guns in the i-th sample, y i Let x′ be the power data of the i-th sample energy router. k For the summed charging gun data, y′ k The summed energy router data; Steps 4-7: Update the sliding window position. The position update formula is as follows: pos = pos + step; Steps 4-8, when the sliding window moves to the last window max When positioning, pos+window max -1 = m1, where m1 is the number of charging station samples after removing outliers; The calculation is performed by directly summing up the Window_max points; Steps 4-9: Update the number of charging station samples to m2; Where m2 = m1 - Window max +1; Steps 4-10: Calculate the weight ω of the electricity data after sliding windowing. k ; Where k represents the cumulative sample point index, 1≤k≤m2; Step 4-11, assign weights ω k The formula for assigning values to the battery data after the sliding window is as follows; Where, x k "、y k "This refers to the weighted power data of the charging gun and energy router." Step 5: Based on the constructed weighted data, establish a linear model to solve the charging gun error coefficient and monitor the charging gun measurement error.
2. The method for monitoring metering errors of a charging gun based on an energy router according to claim 1, characterized in that, The formula for calculating the line loss rate of the charging station in step 2 is as follows: Among them, y i Let x be the power data of the i-th sample energy router, 1≤i≤m0, where m0 is the number of charging station samples, and x is the power data of the i-th sample energy router. ij Let lr be the power data of the j-th charging gun in the i-th sample. i Let n be the line loss rate corresponding to the i-th sample, and n0 be the number of charging guns.
3. The method for monitoring metering errors of a charging gun based on an energy router according to claim 1, characterized in that, The specific process of step 3 is as follows: A1, calculate the mean μ of the overall distribution of line loss rate; Among them, lr i Let m0 be the line loss rate corresponding to the i-th sample, and m0 be the number of charging station samples. A2, calculate the variance σ of the overall distribution of line loss rate; A3, Calculate the upper limit of the line loss rate lr according to the 3σ principle. up ; lr up =μ+3σ; A4, Calculate the lower limit of line loss rate lr according to the 3σ principle. down ; lr down =μ-3σ; A5. Based on the upper and lower limits of the line loss rate, outlier detection is performed. The outlier detection formula is as follows: Among them, sgn=1 is identified as an outlier; A6: Based on the identified anomalies, remove the corresponding charging gun and power router power data.
4. The method for monitoring metering errors of a charging gun based on an energy router according to claim 1, characterized in that, The process of establishing a linear model and solving the charging gun error coefficient in step 5 is as follows: C1, calculate line loss; in, x″ represents the line loss of the k-th sample. kj The weighted data represents the charging gun's battery level in the k-th sample; C2, Establish a linear model; Where β is the charging gun error coefficient, and the subscript is the charging gun number, ranging from 1 to n; δ is other losses in the line; and α is the energy router metering error coefficient. C3, solve for the charging gun error coefficient β; β=(X T X+λE) -1 X T Error; Where, matrix X = [x1″, x2″, ..., x n ",y",1]; λ is the regularization parameter; y” is the accumulated m2 energy router power data vectors.
5. The method for monitoring metering errors of a charging gun based on an energy router according to claim 4, characterized in that, λ is 1.
6. The method for monitoring metering errors of a charging gun based on an energy router according to claim 1, characterized in that, window max =48。 7. The method for monitoring metering errors of a charging gun based on an energy router according to claim 1, characterized in that, η is 0.
8.
8. A method for monitoring metering errors of a charging gun based on an energy router according to claim 1, characterized in that, Tmin is 10 kWh.
9. A method for monitoring metering errors of a charging gun based on an energy router according to claim 1, characterized in that, c can be 2, 3, or 4.
Citation Information
Patent Citations
Charging gun metering error monitoring method based on energy router
CN118818141A
Electric quantity metering error monitoring method of alternating current charging station and charging station
CN113406555A
Direct-current electric energy metering method and device, equipment and storage medium
CN113884758A