A gateway electric energy metering device and a method for judging metering error thereof
By using water-guiding components, double-layer dust-proof components and a real-time monitoring system in the electric energy metering device, the problem of measurement errors of the electric energy metering device in harsh environments is solved, and the accuracy of electric energy measurement and system stability are improved.
Patent Information
- Application Number
- CN202411052332.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-08-02
AI Technical Summary
Existing electrical energy metering devices are prone to measurement errors in harsh environments and long-term use, and are highly calibration costs and difficult to detect in time.
A combination of water -conducting components, double -layered dust components, partitions and sealing strips is designed to design an internet barrier -conducting electrical energy metering device to ensure the stable operation of the electric energy metering mechanism in a harsh environment. Model selection and training, as well as real -time monitoring and alarm systems to achieve judgment and prevention of measurement errors.
Effectively prevent the invasion of dust and water, ensure the accuracy of electricity measurement and the stable operation of the system, and at the same time improve the accuracy of the performance judgment of the power measurement device, and enhance the timely, preventive effects and maintenance efficiency.
Smart Images

Figure CN118610903B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric energy metering, and in particular to an on-board electric energy metering device and a metering error judgment method thereof. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] In the power system, the gateway power metering device is a device specially used to measure and record the amount of power exchanged between the power network and the power generation enterprise. These devices are usually installed at the "gateway" of the power network, that is, the place where the power network is connected to the external power supplier or power output equipment (such as power plants). The functions of the gateway power metering device mainly include power measurement, power quality monitoring, data recording and transmission, remote control and operation, fault detection and alarm, protection function, and communication interface.
[0004] However, in the actual operating environment, electricity metering devices face many challenges. Due to the long service life of the electricity meters, or due to harsh environmental conditions such as high temperature, high humidity, strong electromagnetic interference, etc., as well as possible manufacturing defects, these devices may have measurement errors. If these errors are not calibrated regularly, they are often difficult to detect in time, resulting in errors in electricity bill settlement, affecting the economic benefits of the power system and the interests of users.
[0005] At present, it is not easy to detect measurement errors in electric energy metering devices when they are in use: as a tool for measuring electric energy, the service life of the electric energy meter is usually between 5 and 10 years. Over time, the mechanical parts and electronic components inside the electric energy meter may degrade in performance due to wear, corrosion or aging. For example, the current transformer may become magnetically saturated, resulting in measurement errors, and the electronic components may degrade in performance due to overheating. These changes are not easily noticed by users, because the readings of the electric energy meter may still remain within the normal range, but errors have actually occurred, and users and power supply companies often find it difficult to monitor these errors in real time.
[0006] In addition, the calibration of electricity metering devices usually requires professional technicians using precision instruments, which is a time-consuming and costly task. Power supply companies may fail to calibrate electricity meters regularly due to lack of sufficient resources or insufficient attention, and users may be unable to detect the accuracy of electricity meters themselves due to lack of relevant knowledge.
[0007] Due to the above reasons, if these errors are not discovered and corrected, they may eventually lead to errors in electricity bill settlement, affecting the economic benefits of the power system. For users, electricity bill settlement errors may lead to abnormal increases in electricity bills, affecting their economic interests. Summary of the invention
[0008] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides an upper network gateway electric energy metering device and a method for judging the metering error thereof. The upper network gateway electric energy metering device described in the present invention comprises an electric energy box body, a partition and a sealing strip, wherein the partition is fixedly connected to the inner wall of the electric energy box body, a water guide component is installed on the side of the electric energy box body away from the ground, a double-layer dustproof component and an electric energy metering mechanism installed on the inner side of the electric energy box body are installed on one side of the electric energy box body; dust can be difficult to enter the interior of the electric energy box body, and water cannot enter the interior of the electric energy box body through the door gap, thereby ensuring the accuracy of electric energy metering and the stable operation of the system. At the same time, the metering error judgment method described in the present invention can comprehensively collect voltage, current, power factor and electric energy meter reading data under different operating conditions, through meticulous data preprocessing, feature engineering, model selection and training, and real-time monitoring and alarm system.
[0009] In order to achieve the above object, the present invention adopts the following technical solution:
[0010] A first aspect of the present invention provides a gateway electric energy metering device.
[0011] An electric energy metering device for an upper gateway includes: an electric energy box body, a partition and a sealing strip, wherein the partition is fixedly connected to the inner side wall of the electric energy box body, and includes:
[0012] A water guide component is provided on the top of the electric energy box body, a double-layer dustproof component is installed on one side of the electric energy box body, and an electric energy metering mechanism is installed on the inner wall of the electric energy box body;
[0013] The water guide assembly includes a water guide cap horizontal plate and a water guide cap side plate; one side of the water guide cap horizontal plate is fixedly arranged on the top of the electric energy box body, one side of the two water guide cap side plates are respectively fixedly connected to the two sides of the water guide cap horizontal plate, and the two water guide cap side plates are distributed in a mirror-symmetrical manner relative to the water guide cap horizontal plate;
[0014] The double-layer dustproof assembly comprises a right dustproof assembly installed on one side of the power box body and a left door connected to one side of the power box body, and an inner dustproof assembly is installed in the power box body.
[0015] Furthermore, it includes: the right dustproof component includes a right door and a first observation glass window, one side of the right door is hinged to one side of the power box body through a door hinge, and one side of the first observation glass window is fixedly installed on one side of the right door.
[0016] Furthermore, the internal dustproof assembly includes an internal support frame, an inner door and a second observation glass window, one side of the inner support frame is fixedly mounted on the inner wall of the power box body and is located on the side of the partition away from the right door, and one side of the inner door is hinged to one side of the inner support frame through a door hinge.
[0017] Furthermore, the electric energy metering mechanism includes an electric energy component located on one side of the partition and an intelligent processing component located on the other side of the partition, and a switch component is provided on the inner wall of the electric energy box body and below the intelligent processing component.
[0018] Furthermore, the electric energy component comprises a mounting plate, one side of which is fixedly mounted on the inner side wall of the electric energy box body.
[0019] Furthermore, the electric energy assembly also includes a meter rack, one side of which is fixedly mounted on one side of the mounting plate by bolts, and the meter racks are multiple and evenly distributed.
[0020] Furthermore, the electric energy component also includes an electric energy meter, and one side of the electric energy meter is fixedly mounted on the inner side of the meter rack.
[0021] Furthermore, the intelligent processing component includes a reinforcement connecting plate, one side of which is fixedly mounted on the inner wall of the power box body.
[0022] Furthermore, the intelligent processing component also includes an intelligent data processing device, and one side of the intelligent data processing device is fixedly mounted on one side of the reinforced connecting plate.
[0023] Furthermore, the switch assembly includes a switch bracket, and one side of the switch bracket is fixedly mounted on the inner wall of the power box body by bolts.
[0024] Furthermore, the switch assembly also includes an electric power switch, and one side of the electric power switch is fixedly mounted on one side of the switch bracket.
[0025] Furthermore, there are multiple power switches arranged at equal distances.
[0026] A second aspect of the present invention provides a method for determining a metering error of an upstream gateway electric energy metering device.
[0027] A method for determining a measurement error of an electric energy metering device at a gateway, comprising:
[0028] Obtain relevant data collected by the electric energy metering device for the upper gateway described in the first aspect; the relevant data includes: voltage data, current data, power factor and electric energy meter reading;
[0029] Preprocessing the relevant data, wherein the preprocessing process includes: cleaning and standardizing the relevant data;
[0030] Based on the characteristic indicators of the extracted relevant data, the isolation forest algorithm or autoencoder is used to identify abnormal data.
[0031] Furthermore, the process of using the isolation forest algorithm includes: using the isolation forest algorithm, randomly selecting a feature and a split value, and dividing the data points into two subsets; repeating the process of randomly selecting a feature and a split value for each subset until only one data point remains in each subset; calculating the scores of all data points, and if the score of a data point is greater than a set threshold, the data point is an outlier.
[0032] Furthermore, the process of adopting the clustering-based anomaly detection method includes:
[0033] Use K-means algorithm to cluster the data and get K cluster centers. Assume that the kth cluster center is mu_k, and the set of all cluster centers is {mu_1,mu_2,...,mu_K};
[0034] Calculate the distance from each data point to the cluster center: For each data point (x_i), calculate its distance to the kth cluster center d(x_i,mu_k);
[0035] For each data point x_i, its reconstruction error E(x_i) is obtained by weighted average of its distance to each cluster center. The weight is the distance from each cluster center to the point. The calculation formula is:
[0036] E(x_i)=sum_{k=1}^{K}w_kcdotd(x_i,mu_k)^2;
[0037] Among them, w_k is the weight of the cluster center mu_k, which is usually inversely proportional to the distance from the cluster center to the data point, that is, the farther the distance, the smaller the weight of the cluster center;
[0038] A reconstruction error threshold T is determined. When the reconstruction error E(x_i) of a data point exceeds the set reconstruction error threshold, the data point is considered to be abnormal.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] The present invention proposes an upper door electric energy metering device. Through the coordinated use of a water guide component, a double-layer dustproof component, a partition, an electric energy metering mechanism and a sealing strip on the electric energy box body, dust can be prevented from entering the interior of the electric energy box body. This is crucial for maintaining the accuracy of the electric energy metering mechanism, ensuring that the electric energy metering mechanism can operate stably even in a harsh dusty environment. At the same time, water cannot enter the interior of the electric energy box body through the door gap, thereby protecting the internal electronic components from the influence of the humid environment, ensuring the accuracy of electric energy metering and the stable operation of the system.
[0041] The present invention proposes a method for judging the metering error of an electric energy metering device at a network gateway, which can comprehensively collect voltage, current, power factor and electric energy meter reading data under different operating conditions, thereby improving the accuracy of performance judgment of the electric energy metering device. Through meticulous data preprocessing, feature engineering, model selection and training, and real-time monitoring and alarm systems, data quality, model optimization and generalization capabilities are improved, timeliness, preventive effects and maintenance efficiency are enhanced, and ease of use, decision support and user participation are improved. These improvements improve the ability of the electric energy metering device to adapt to changes in grid conditions and data patterns, as well as the accuracy of predicting and judging errors. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0043] Figure 1 It is a structural diagram of the upper gateway electric energy metering device shown in the present invention;
[0044] Figure 2 It is a cross-sectional schematic diagram of the electric energy meter connection structure shown in the present invention;
[0045] Figure 3 is a cross-sectional schematic diagram of the switch bracket connection structure;
[0046] In the figure, 1. electric energy box body, 200. water guide assembly, 201. water guide cap horizontal plate, 202. water guide cap side plate, 3011. right door, 3012. first observation glass window, 302. left door, 3031. inner support frame, 3032. inner door, 3033. second observation glass window, 4. partition, 500. electric energy metering mechanism, 5011. mounting fixing plate, 5012. meter rack, 5013. electric energy meter, 5021. reinforcement connecting plate, 5022. intelligent data processing device, 5031. switch bracket, 5032. electric energy switch, 6. sealing strip. DETAILED DESCRIPTION
[0047] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0048] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0049] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0050] Embodiment 1
[0051] like Figure 1 , Figure 2 and Figure 3 As shown, this embodiment provides an upper gateway electric energy metering device, comprising an electric energy box body 1, a partition 4 and a sealing strip 6, wherein the partition 4 is fixedly connected to the inner wall of the electric energy box body 1; a water guide component 200 is installed on the side of the electric energy box body 1 away from the ground, a double-layer dustproof component and an electric energy metering mechanism 500 installed on the inner side of the electric energy box body 1 are installed on one side of the electric energy box body 1, and a sealing strip 6 is installed between the double-layer dustproof component and the opposite side of the electric energy box body 1;
[0052] By using the water guide component 200, the double-layer dustproof component, the partition 4, the electric energy metering mechanism 500 and the sealing strip 6 on the electric energy box body 1, it is difficult for dust to enter the interior of the electric energy box body 1, which is crucial to maintaining the accuracy of the electric energy metering mechanism 500, ensuring that the electric energy metering mechanism 500 can operate stably even in a harsh dusty environment. At the same time, water cannot enter the interior of the electric energy box body 1 through the door gap, thereby protecting the internal electronic components from the influence of the humid environment, ensuring the accuracy of electric energy metering and the stable operation of the system, and being able to comprehensively collect voltage, current, power factor and electric energy meter reading data under different operating conditions, thereby improving the accuracy of performance judgment of the electric energy metering device. Through meticulous data preprocessing, feature engineering, model selection and training, and real-time monitoring and alarm systems, data quality, model optimization and generalization capabilities are improved, timeliness, preventive effects and maintenance efficiency are enhanced, and ease of use, decision support and user participation are improved. These improvements improve the ability of the electric energy metering device to adapt to grid conditions and changes in data patterns, as well as the accuracy of prediction and judgment errors.
[0053] In this embodiment, the water guide component 200 , the double-layer dustproof component and the electric energy metering mechanism 500 are structures for improving the dustproof and waterproof performance of the electric energy box body 1 .
[0054] like Figure 1 , Figure 2 and Figure 3 As shown, the water guide assembly 200 includes a water guide cap horizontal plate 201 and a water guide cap side plate 202; one side of the water guide cap horizontal plate 201 is fixedly connected to the side of the power box body 1 away from the ground, one side of the two water guide cap side plates 202 are respectively fixedly connected to the two sides of the water guide cap horizontal plate 201, and the two water guide cap side plates 202 are distributed in a mirror-symmetrical manner;
[0055] The double-layer dustproof assembly includes a right dustproof assembly installed on one side of the power box body 1 and a left door 302 connected to one side of the power box body 1, and an inner dustproof assembly is installed in the power box body 1;
[0056] The electric energy metering mechanism 500 includes an electric energy component installed in the electric energy box body 1 and located on one side of the partition 4, and an intelligent processing component installed on the inner wall of the electric energy box body 1 and located on the other side of the partition 4. A switch component located below the intelligent processing component is installed on the inner wall of the electric energy box body 1.
[0057] It should be noted that the right dustproof component includes a right door 3011 and a first observation glass window 3012; one side of the right door 3011 is hinged to one side of the power box body 1 through a door hinge, and one side of the first observation glass window 3012 is fixedly installed on one side of the right door 3011 to facilitate the user to observe the usage of the internal power components.
[0058] It can be understood that the internal dustproof assembly includes an inner support frame 3031, an inner door 3032 and a second observation glass window 3033; one side of the inner support frame 3031 is fixedly mounted on the inner wall of the power box body 1 and is located on the side of the partition 4 away from the right door 3011, and one side of the inner door 3032 is hinged to one side of the inner support frame 3031 through a door hinge in order to further enhance the dustproof effect.
[0059] In addition, the electric energy component includes a mounting plate 5011, a meter rack 5012 and an electric energy meter 5013; one side of the mounting plate 5011 is fixedly mounted on the inner wall of the electric energy box body 1, one side of the meter rack 5012 is fixedly mounted on one side of the mounting plate 5011 by bolts, the number of meter racks 5012 is multiple and evenly distributed, one side of the electric energy meter 5013 is fixedly mounted on the inner side of the meter rack 5012, so as to be able to comprehensively collect voltage, current, power factor and electric energy meter reading data under different operating conditions.
[0060] In this embodiment, the intelligent processing component includes a reinforcement connection plate 5021 and an intelligent data processing device 5022; one side of the reinforcement connection plate 5021 is fixedly mounted on the inner side wall of the power box body 1, and one side of the intelligent data processing device 5022 is fixedly mounted on one side of the reinforcement connection plate 5021;
[0061] The switch assembly includes a switch bracket 5031 and an electric energy switch 5032; one side of the switch bracket 5031 is fixedly mounted on the inner wall of the electric energy box body 1 by bolts, and one side of the electric energy switch 5032 is fixedly mounted on one side of the switch bracket 5031, and the number of electric energy switches 5032 is multiple and arranged equidistantly, so as to be able to process the data collected by the electric energy meter 5013.
[0062] The working principle of this embodiment is as follows: when in use, the mounting plate 5011 is mounted in the electric energy box body 1, and then a plurality of meter racks 5012 are mounted one by one on the mounting plate 5011 by bolts, and finally the electric energy meter 5013 is mounted in the corresponding meter rack 5012, and then the reinforcing connecting plate 5021 is mounted on another space in the electric energy box body 1 isolated by the partition 4, and then the intelligent data processing device 5022 is fixed on one side of the reinforcing connecting plate 5021 by bolts, and then the switch bracket 5031 and the electric energy switch 5032 are installed one by one, and then the inner door 3032, the left door 302 and the right door 3011 are closed in turn, and the sealing effect of the sealing strip 6 can effectively prevent dust and rainwater from penetrating into the electric energy box body 1, and when observation is needed, the internal situation of the electric energy box body 1 can be observed through the second observation glass window 3033 and the first observation glass window 3012, so as to prevent dust and rainwater from entering the electric energy box body 1.
[0063] Embodiment 2
[0064] This embodiment provides a method for determining a metering error of an on-board electric energy metering device, comprising the following steps:
[0065] Step 1) Data Collection:
[0066] Collect historical data of the power metering devices at the gateway, including but not limited to voltage (V), current (A), power factor (PF), and power meter readings (kW h); Voltage (V): measures the voltage difference between the two ends of the device; Current (A): the rate of charge flow through the device; Power factor (PF): indicates the ability of the device to convert electrical energy into other forms, such as mechanical or thermal energy; Power meter readings (kW h): the total amount of energy consumed or generated by the device; ensure that the data covers various operating conditions, such as different loads (light load, full load, overload), voltage fluctuations (including normal fluctuations and abnormal conditions), temperature, etc.;
[0067] Step 2) Data preprocessing:
[0068] Clean the data to remove outliers and noise. Outliers can be identified by calculating the Z score or using the IQR (interquartile range) method. For example, if a data point is more than 2 standard deviations away from the mean, it may be an outlier. Standardize the data to ensure that data of different magnitudes can be compared fairly. Convert the data to a uniform scale. This can be achieved through minimum to maximum standardization or Z score standardization. For example, minimum to maximum standardization scales the data to between 0 and 1.
[0069] The dataset is divided into training set, validation set and test set. The dataset is usually divided into 70% training, 15% validation and 15% test. Stratified sampling can be used to ensure that the proportion of each type of data in each split is similar.
[0070] Step 3) Feature Engineering:
[0071] Extract features related to the accuracy of electric energy metering, such as voltage fluctuation range, current harmonic content, etc.; voltage fluctuation range: the ratio of voltage peak value to average voltage; current harmonic content: the magnitude and phase of periodic non-sinusoidal components in the current waveform; power factor change: the deviation of power factor from average power factor; use domain knowledge to select or construct characteristic indicators of electric energy metering errors;
[0072] Step 4) Model selection and training:
[0073] Select a suitable machine learning model, such as random forest, support vector machine or neural network; use the training set data to train the model and adjust the model parameters to optimize performance; Model selection: select a model based on the nature of the problem. For example, random forest is suitable for dealing with nonlinear relationships and complex relationships between features, while neural network is suitable for dealing with high-dimensional data and identifying complex patterns; Model training: use the training set data to train the model. Model parameters (such as tree depth, learning rate, etc.) can be optimized through techniques such as cross-validation and grid search;
[0074] Step 5) Model verification and optimization:
[0075] Use validation set data to evaluate model performance and adjust model structure or parameters; apply cross-validation and other techniques to prevent overfitting; Performance evaluation: calculate performance indicators such as accuracy, recall, F1 score, etc. For example, accuracy = (true positive + true negative) / total number of samples; Model optimization: adjust model structure or parameters based on the performance on the validation set. Regularization techniques such as L1 or L2 can be used to prevent overfitting;
[0076] Step 6) Error detection algorithm development:
[0077] Develop algorithms to identify unusual patterns in the output of energy metering devices that may indicate errors; use anomaly detection algorithms such as isolation forest or cluster-based anomaly detection;
[0078] Isolation Forest: A tree-based anomaly detection algorithm that evaluates anomalies by calculating the distance of a data point to its nearest neighbors;
[0079] Clustering-based anomaly detection: A method that uses the distance between the cluster center and the data point to evaluate whether the data point is abnormal, uses the K-means clustering method, and defines a concept of reconstruction error;
[0080] Step 7) Performance Evaluation:
[0081] Use the test set data to evaluate the accuracy and robustness of the model; calculate performance indicators such as accuracy, recall, F1 score, etc. Accuracy: the proportion of samples correctly predicted by the model to the total samples; Robustness: the performance of the model on different types of noisy data;
[0082] Step 8) Real-time monitoring and alarm system:
[0083] Real-time monitoring: collect data from the energy metering device in real time and update the model prediction in real time; alarm system: when there is an error in the model prediction, the alarm system is automatically triggered to notify the maintenance personnel;
[0084] Step 9) Feedback Loop:
[0085] Feedback the test results to maintenance personnel for manual review; collect manual review results for further training and optimization of the model;
[0086] Step 10) User Interface Development:
[0087] Develop user interfaces to enable non-specialists to understand test results; provide visualization tools that provide charts, heat maps, and dashboards to help users understand the status of energy metering devices;
[0088] Step 11) System deployment and integration:
[0089] Deploy the detection system to the actual environment. Deploy the system to the production environment while ensuring data security and compliance. Ensure that the system can be seamlessly integrated with the existing power metering devices and that the system can communicate with the power metering devices to collect data in real time.
[0090] Through the above steps, an intelligent detection method can be constructed, which can automatically and accurately detect whether there are errors in the power metering device at the upper network interface, and can continuously optimize to adapt to new data and conditions;
[0091] It should be noted that data preprocessing in step 2) is an important step in data analysis, which aims to improve data quality and ensure the accuracy and reliability of analysis results. The following is the formula and calculation process for cleaning data in data preprocessing:
[0092] Cleaning data formula
[0093] Objective: Remove outliers;
[0094] Methods: Outliers were identified using Z-score or IQR methods;
[0095] Z-score method:
[0096] Z = frac{(X-mu)}{sigma}
[0097] Where X is the data point, mu is the mean, and sigma is the standard deviation;
[0098] Determination of outliers:
[0099] text{If}|Z|>2text{, it is considered an outlier}
[0100] Example:
[0101] Suppose there is a data point X=10, mean mu=5, standard deviation sigma=2;
[0102] Z = frac{(10-5)}{2} = 2.5
[0103] Because |Z|>2, this data point is considered an outlier;
[0104] It can be understood that data preprocessing in step 2) is an important step in data analysis, which aims to improve data quality and ensure the accuracy and reliability of analysis results. The following is the formula and calculation process for standardized data in data preprocessing:
[0105] Standardized data formula
[0106] Goal: Convert data to values between 0 and 1;
[0107] Method: The minimum to maximum normalization formula is:
[0108] Z=frac{Y-Y_{text{min}}}{Y_{text{max}}-Y_{text{min}}}
[0109] Where Y is the original data point, Y_{text{min}} and Y_{text{max}} are the minimum and maximum values of the data respectively;
[0110] Example:
[0111] Suppose there is a data point Y=4, the minimum value Y_{text{min}}=1, and the maximum value Y_{text{max}}=10;
[0112] Z=frac{4-1}{10-1}=0.333...
[0113] The standardized data point is Y'=0.333...;
[0114] In addition, data preprocessing in step 2) is an important step in data analysis, which aims to improve data quality and ensure the accuracy and reliability of analysis results. The following is the formula and calculation process for segmenting the data set in data preprocessing:
[0115] Split Dataset Formula
[0116] Objective: Divide the dataset into training set, validation set and test set;
[0117] Method: Usually the dataset is divided into 70% training set, 15% validation set, and 15% test set.
[0118] Example:
[0119] Suppose there is a data set with 100 data points;
[0120] - Training set = 70 data points
[0121] - Validation set = 15 data points
[0122] -Test set = 15 data points
[0123] Using stratified sampling methods can ensure that the proportions of various types of data in the divided data set are similar;
[0124] Calculation process:
[0125] - Calculate the proportion of each type of data;
[0126] -Calculate the number of data points that should be included in each split based on the total data points and the ratio of each type of data;
[0127] Calculation principle:
[0128] - Cleaning data is to remove useless or erroneous inputs for analysis;
[0129] - Standardizing data is to ensure that the data is on the same scale for easier comparison and analysis;
[0130] -Dataset segmentation is to avoid model overfitting and test generalization ability;
[0131] In this embodiment, the isolation forest in step 6) error detection algorithm development is a tree-based anomaly detection algorithm that "isolates" data points by randomly selecting features and splitting the data points on the randomly selected values. Anomalies are usually easier to isolate because they are unique in the data set;
[0132] The anomaly score calculation formula for isolation forest is as follows:
[0133] text{OutlierScore}=logleft(frac{N}{d}right)
[0134] in:
[0135] - N is the number of samples in the dataset;
[0136] -d is the dimension of the data point;
[0137] Calculation process:
[0138] S1 randomly selects a feature A and a split value v to divide the data points into two subsets. The process of dividing the data points into two subsets is to randomly select a feature (for example, an attribute or dimension), and then randomly select a value as the split point (usually an attribute value of the feature), and divide the data points in the data set into two subsets according to the value of this feature. This process is repeated, each time selecting a different feature and a different split value, until only one data point is left in each subset. Therefore, each split operation will divide the data points into two different subsets, and which subset contains which data point depends on the randomly selected feature and split value.
[0139] S2 repeats S1 for each subset until only one data point remains in each subset;
[0140] The score of the S3 outlier is the logarithm of the maximum depth (i.e., the number of trees) among these isolation steps;
[0141] Calculation results:
[0142] If a data point has a high score, it means it was isolated quickly and therefore considered an outlier.
[0143] Calculation principle:
[0144] The principle of Isolation Forest is based on the fact that normal data points usually have more dimensions, so they require more steps to be completely isolated, while outliers can be completely isolated in fewer steps due to their uniqueness;
[0145] It should be further explained that in step 6) when developing the error detection algorithm, when performing clustering-based anomaly detection, we usually use the distance between the cluster center and the data point to evaluate whether the data point is abnormal. Here, the K-means clustering method is used, and a concept of reconstruction error is defined. The reconstruction error usually refers to the difference between the data point reconstructed according to the clustering result and the original data point. If the reconstruction error exceeds a certain threshold, the data point is considered to be abnormal;
[0146] Reconstruction error formula and calculation process
[0147] S1. Cluster center calculation: First, use the K-means algorithm to cluster the data and obtain K cluster centers. Assume that the kth cluster center is mu_k, and the set of all cluster centers is ({mu_1,mu_2,...,mu_K});
[0148] S2. Calculate the distance from each data point to the cluster center: For each data point x_i, calculate its distance to the kth cluster center d(x_i,mu_k). Euclidean distance can be used here, and the calculation formula is:
[0149] d(x_i,mu_k)=sqrt{sum_{j=1}^{n}(x_{ij}-mu_{kj})^2}
[0150] Among them, x_{ij} is the j-th feature of data point x_i, and mu_{kj} is the j-th feature of cluster center mu_k;
[0151] S3. Calculate the reconstruction error: For each data point x_i, its reconstruction error E(x_i) can be obtained by weighted average of its distance to each cluster center. The weight is the distance from each cluster center to the point. The calculation formula is:
[0152] E(x_i)=sum_{k=1}^{K}w_kcdotd(x_i,mu_k)^2
[0153] Among them, w_k is the weight of the cluster center mu_k, which is usually inversely proportional to the distance from the cluster center to the data point, that is, the farther the distance, the smaller the weight of the cluster center;
[0154] S4. Determine the threshold: A reconstruction error threshold T needs to be determined. When the reconstruction error E(x_i) of a data point exceeds this threshold, the data point is considered abnormal.
[0155] Calculation results
[0156] Suppose there is a data set. After K-means clustering, the reconstruction error of a data point is calculated to be E(x_i)=100, and the threshold T=50. According to the definition of reconstruction error, this data point is considered abnormal.
[0157] Calculation principle:
[0158] The calculation principle of reconstruction error is based on the assumption that normal data points should have a relatively compact distribution in the cluster to which they belong. Therefore, by calculating the distance from the data point to its cluster center and taking a weighted average of these distances, an indicator reflecting the compactness of the data point distribution can be obtained. If the reconstruction error exceeds the set threshold, it means that the data point is too loosely distributed compared to other points in its cluster and is therefore considered abnormal.
[0159] This calculation method is effective in identifying outliers in the data because it considers the relative position of the data points to the cluster center based on the clustering results. Outliers usually form isolated points in the cluster, and their distance to the cluster center is greater than other points, so the reconstruction error will be larger. This method is simple and intuitive, easy to implement, and has shown good outlier detection performance in many cases.
[0160] Compared with the prior art: the method for judging the metering error of the electric energy metering device at the upper gateway, through the coordinated use of the water guide component 200, the double-layer dustproof component, the partition 4, the electric energy metering mechanism 500 and the sealing strip 6 on the electric energy box body 1, can make it difficult for dust to enter the interior of the electric energy box body 1, which is very important for maintaining the accuracy of the electric energy metering mechanism 500, ensuring that the electric energy metering mechanism 500 can operate stably even in a harsh dusty environment, and at the same time, water cannot enter the interior of the electric energy box body 1 through the door gap, thereby protecting the internal electronic components from the influence of the humid environment, ensuring the accuracy of electric energy metering. Accuracy and stable operation of the system. At the same time, it can also comprehensively collect voltage, current, power factor and electricity meter reading data under different operating conditions, which improves the accuracy of performance judgment of electricity metering devices. Through meticulous data preprocessing, feature engineering, model selection and training, as well as real-time monitoring and alarm systems, it improves data quality, model optimization and generalization capabilities, enhances timeliness, preventive effects and maintenance efficiency, improves ease of use, decision support and user participation. These improvements improve the ability of electricity metering devices to adapt to changes in grid conditions and data patterns, as well as the accuracy of prediction and judgment errors.
[0161] The electrical components appearing in the text are all electrically connected to the main controller and the power supply. The main controller can be a conventional known device that controls a computer, etc., and the existing publicly available power connection technology and power supply are also common knowledge in the field, so this application will not go into details.
[0162] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for determining measurement error of an electric energy metering device at a gateway, characterized in that: include: Use the electric energy metering device at the gateway to collect relevant data; The relevant data include: voltage data, current data, power factor and electric energy meter reading; Clean and standardize relevant data; The relevant data are cleaned and standardized as described: the data are cleaned to remove outliers and noise, and outliers are identified by calculating Z scores or using interquartile ranges (IQRs); Determination of outliers: text{if}|Z|>2text{then it is considered an outlier}; Standardize the data to convert the data to a uniform scale by standardizing the data from the minimum to the maximum or by Z-score standardization to fairly compare data of different magnitudes; The dataset is divided into training set, validation set and test set. The dataset is divided into 70% training, 15% validation and 15% test. Based on the characteristic indicators of the extracted relevant data, the isolation forest algorithm or clustering-based anomaly detection method is used to identify abnormal data; The process of using the isolation forest algorithm includes: using the isolation forest algorithm, randomly selecting a feature and a split value, and dividing the data points into two subsets; repeating the process of randomly selecting a feature and a split value for each subset until only one data point remains in each subset; calculating the scores of all data points, and if the score of a data point is greater than a set threshold, the data point is an outlier; The process of adopting clustering-based anomaly detection method includes: Use K-means algorithm to cluster the data and get K cluster centers. Assume that the kth cluster center is mu_k, and the set of all cluster centers is {mu_1,mu_2,...,mu_K}; Calculate the distance from each data point to the cluster center: For each data point x_i, calculate its distance to the kth cluster center d(x_i,mu_k); For each data point x_i, its reconstruction error E(x_i) is obtained by weighted average of its distance to each cluster center, and the weight is the distance from each cluster center to the point; Determine a reconstruction error threshold T. When the reconstruction error E(x_i) of a data point exceeds the set reconstruction error threshold, the data point is considered abnormal. The upper door electric energy metering device comprises: an electric energy box body, a partition and a sealing strip, the partition is fixedly connected to the inner side wall of the electric energy box body, a water guide component is provided on the box top of the electric energy box body, a double-layer dustproof component is installed on one side of the electric energy box body, and an electric energy metering mechanism is installed on the inner wall of the electric energy box body; the water guide component comprises a water guide cap horizontal plate and a water guide cap side plate; one side of the water guide cap horizontal plate is fixedly arranged on the box top of the electric energy box body, one side of the two water guide cap side plates are respectively fixedly connected to the two sides of the water guide cap horizontal plate, and the two water guide cap side plates are distributed in a mirror-symmetrical manner relative to the water guide cap horizontal plate; the double-layer dustproof component comprises a right dustproof component installed on one side of the electric energy box body and a left door connected to one side of the electric energy box body, the electric energy box body An inner dustproof assembly is installed inside; the right dustproof assembly includes a right door and a first observation glass window, one side of the right door is hinged to one side of the power box body through a door hinge, and one side of the first observation glass window is fixedly installed on one side of the right door; the inner dustproof assembly includes an inner support frame, an inner door and a second observation glass window, one side of the inner support frame is fixedly installed on the inner wall of the power box body and is located on the side of the partition away from the right door, and one side of the inner door is hinged to one side of the inner support frame through a door hinge; the electric energy metering mechanism includes an electric energy assembly located on one side of the partition and an intelligent processing assembly located on the other side of the partition, and a switch assembly is provided on the inner wall of the power box body and below the intelligent processing assembly.
2. The method for determining the measurement error of the electric energy metering device at the gateway according to claim 1, characterized in that: The electric energy component comprises a mounting plate, one side of which is fixedly mounted on the inner side wall of the electric energy box body.
3. The method for determining the measurement error of the electric energy metering device for the upper network gateway according to claim 2 is characterized in that: The electric energy assembly also includes a meter rack, one side of which is fixedly mounted on one side of the mounting plate by bolts, and the number of the meter racks is multiple and evenly distributed.
4. The method for determining the measurement error of the electric energy metering device at the gateway according to claim 3 is characterized in that: The electric energy component also includes an electric energy meter, one side of which is fixedly mounted on the inner side of the meter rack.
5. The method for determining the measurement error of the electric energy metering device for the upper network gateway according to claim 4, characterized in that: The intelligent processing component comprises a reinforcing connecting plate, one side of which is fixedly mounted on the inner side wall of the power box body.
6. The method for determining the measurement error of the electric energy metering device at the gateway according to claim 5, characterized in that: The intelligent processing component also includes an intelligent data processing device, one side of which is fixedly mounted on one side of the reinforced connecting plate.
7. The method for determining the measurement error of the electric energy metering device at the gateway according to claim 1, characterized in that: The switch assembly comprises a switch bracket, one side of which is fixedly mounted on the inner side wall of the electric energy box body by means of bolts.
8. The method for determining the measurement error of the electric energy metering device for the upper network gateway according to claim 7, characterized in that: The switch assembly also includes an electric power switch, one side of which is fixedly mounted on one side of the switch bracket.
9. The method for determining the measurement error of the electric energy metering device at the gateway according to claim 8, characterized in that: The number of the electric energy switches is multiple and they are arranged at equal distances.
10. A method for determining a measurement error of an on-board electric energy metering device, comprising the following steps: Step 1) Data collection: Collect historical data of the energy metering device at the gateway, including but not limited to voltage, current, power factor and energy meter readings; voltage is the voltage difference between the two ends of the measuring device; Current is the rate of flow of electric charge through a device; power factor is the ability of a device to convert electrical energy into other forms; the energy meter reading is the total amount of energy consumed or generated by the device; Ensure data covers a wide range of operating conditions, including varying loads, voltage fluctuations, and temperatures; Step 2) Data preprocessing: Clean the data to remove outliers and noise. Outliers are identified by calculating Z scores or using the IQR method; standardize the data to ensure fair comparison of data of different magnitudes, convert the data to a unified scale, and achieve this through minimum to maximum standardization or Z score standardization; split the data set into training set, validation set, and test set. The data set is usually split in a ratio of 70% training, 15% validation, and 15% test. Use stratified sampling to ensure that the proportion of each type of data in each split is similar; Step 3) Feature Engineering: Extract features related to the accuracy of electric energy metering, including voltage fluctuation range, current harmonic content, and power factor change; voltage fluctuation range is the ratio of the peak voltage to the average voltage; current harmonic content is the magnitude and phase of the periodic non-sinusoidal wave component in the current waveform; power factor change is the deviation between the power factor and the average power factor; use domain knowledge to select or construct characteristic indicators of electric energy metering errors; Step 4) Model selection and training: Select a machine learning model, train the machine learning model using the training set data, and adjust the machine learning model parameters to optimize performance; select a model based on the nature of the problem; use the training set data to train the model; Step 5) Model validation and optimization: Use validation set data to evaluate model performance and adjust model structure or parameters; Step 6) Error detection algorithm development: Develop an algorithm to identify abnormal patterns in the output of the energy metering device at the gateway; Step 7) Performance evaluation: Evaluate the model using the test set data; Step 8) Real-time monitoring and alarm system: collect data from the energy metering device at the gateway in real time and update the model prediction in real time; when there is an error in the model prediction, the alarm system is automatically triggered to notify the maintenance personnel; Step 9) Feedback loop: Feedback the test results to maintenance personnel for manual review; Collect manual review results for further training and optimization of the model; The electric energy metering device for the upper gateway includes: an electric energy box body, a partition and a sealing strip, wherein the partition is fixedly connected to the inner side wall of the electric energy box body, a water guide component is provided on the top of the electric energy box body, a double-layer dustproof component is installed on one side of the electric energy box body, and an electric energy metering mechanism is installed on the inner wall of the electric energy box body; the water guide component includes a water guide cap horizontal plate and a water guide cap side plate; one side of the water guide cap horizontal plate is fixedly arranged on the top of the electric energy box body, one side of the two water guide cap side plates are respectively fixedly connected to the two sides of the water guide cap horizontal plate, and the two water guide cap side plates are mutually connected. The water guide cap transverse plates are distributed in mirror symmetry; the double-layer dustproof assembly includes a right dustproof assembly installed on one side of the power box body and a left door connected to one side of the power box body, and an inner dustproof assembly is installed in the power box body; the right dustproof assembly includes a right door and a first observation glass window, one side of the right door is hinged on one side of the power box body through a door hinge, and one side of the first observation glass window is fixedly installed on one side of the right door; the inner dustproof assembly includes an inner support frame, an inner door and a second observation glass window, one side of the inner support frame The inner door is fixedly mounted on the inner wall of the power box body and is located on the side of the partition away from the right door, and one side of the inner door is hinged on one side of the inner support frame through a door hinge; the power metering mechanism includes an power component located on one side of the partition and an intelligent processing component located on the other side of the partition, and a switch component is provided on the inner wall of the power box body and below the intelligent processing component; the power component includes a mounting plate, one side of which is fixedly mounted on the inner wall of the power box body; the power component also includes a meter rack, one side of which is fixedly mounted on one side of the mounting plate by bolts, and the number of the meter racks is multiple and evenly distributed; the power component also includes an power meter, one side of which is fixedly mounted on the inner side of the meter rack; the switch component includes a switch bracket, one side of which is fixedly mounted on the inner wall of the power box body by bolts; the switch component also includes an power switch, one side of which is fixedly mounted on one side of the switch bracket; the number of the power switches is multiple and arranged equidistantly.
11. The method for determining measurement error of an on-board gateway electric energy metering device according to claim 10, characterized in that: The intelligent processing component comprises a reinforcing connecting plate, one side of which is fixedly mounted on the inner side wall of the power box body.
12. The method for determining measurement error of an upstream gateway electric energy metering device according to claim 11, characterized in that: The intelligent processing component also includes an intelligent data processing device, one side of which is fixedly mounted on one side of the reinforced connecting plate.
Citation Information
Patent Citations
Multifunctional outdoor cabinet
CN104953485A
Method and device for warning about abnormal behavior
CN109509327A
Method for discovering abnormal data by applying isolated forest algorithm in residential electricity safety analysis
CN111767951A
Abnormity analysis system of electric energy metering device and analysis method thereof
CN117607780A