A three-phase energy meter capable of tracking power loss

By optimizing the distance metric of the K-means clustering algorithm, using time correlation and Gaussian kernel function, the active power time series data of the three-phase energy meter is clustered, which solves the problem of sample misclassification and improves the accuracy of electricity theft detection. sex and stability.

CN118378197BActive Publication Date: 2024-08-30SHANDONG DEYUAN POWER TECHNOLOGY CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410814924.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-08-30
Estimated Expiration
2044-06-24

AI Technical Summary

Technical Problem

When the existing technology uses the K-means clustering algorithm to cluster and divide the active power time series data of the three-phase electric energy meter, it is easy to cause the samples to be misclassified due to temporary load fluctuations, which reduces the accuracy of electricity theft detection.

Method used

By obtaining the active power time series of the three-phase electric energy meter, calculating the time correlation factor and correlation optimization factor, using the DTW algorithm for dynamic time warping, combined with the Gaussian kernel function to optimize the distance metric, and performing K-means clustering to improve clustering accuracy.

Benefits of technology

In the face of temporary load fluctuations, it ensures that samples with similar power consumption patterns are correctly classified into the same cluster, improves the stability of power theft detection, avoids false positives or false negatives, and enhances the reliability of the power grid in complex power usage environments. Stable operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118378197B
    Figure CN118378197B
Patent Text Reader

Abstract

The present invention relates to the technical field of measuring electric variables, and in particular to a three-phase electric energy meter capable of tracking electric power loss, comprising a first data processing module, for continuously acquiring a sample set consisting of active power time series of the three-phase electric energy meter under at least two preset cycles, and respectively acquiring a time correlation factor between each two samples; a second data processing module, for acquiring a correlation optimization factor between the two samples; a distance metric optimization module, for acquiring an optimized distance metric between multidimensional vectors of the two samples based on the correlation optimization factor between the two samples; and an electric power loss analysis module, for acquiring a corresponding clustering result based on the optimized distance metric between the multidimensional vectors of all samples, and if a suspected electric power theft cluster is detected in the clustering result, the total electric power loss is acquired based on the suspected electric power theft cluster, so that when power fluctuations are caused by the connection or disconnection of high-power equipment, stable electric power theft detection performance can be maintained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of measuring electric variables, and in particular to a three-phase electric energy meter capable of tracking electric power loss. Background Art

[0002] The three-phase energy meter has basic energy metering functions, which are used to accurately record and monitor power consumption to help understand the operation status of the power grid. When the three-phase energy meter is working, the user's electricity theft behavior will cause the data record of the three-phase energy meter to be abnormal. Failure to detect the theft problem in time will result in power loss. Therefore, it is very important to collect historical operation data for power loss detection during the operation of the three-phase energy meter. It can analyze whether the user's electricity consumption characteristics are abnormal, so as to determine the occurrence of theft.

[0003] In the prior art, for power loss detection, the active power time series data of the three-phase electric energy meter is usually used as the detection object, and the active power time series data is clustered by introducing the K-means clustering analysis method with data fluctuation weights. When clustering, the time series data fluctuation within the window is used to optimize the distance metric to highlight the local characteristics of the data, that is, different weights are assigned to different windows to more accurately distinguish between normal power consumption patterns and abnormal power theft patterns. However, when facing temporary fluctuations, this method is prone to misclassifying two samples with similar patterns into different clusters. Therefore, when calculating the distance between points, although the load fluctuation difference of the sample window is emphasized, no distinction is made for the specific fluctuation pattern, and no optimal matching is performed between the windows of the samples, resulting in deviations in the distance calculation between the samples. Therefore, even if the overall power consumption patterns of the two samples are similar, they may be mistakenly classified into different clusters during the clustering process due to these short-term fluctuations.

[0004] Therefore, how to improve the accuracy of clustering the active power time series data of three-phase electric energy meters using the K-means clustering algorithm in order to improve the power theft detection performance of the power grid based on the clustering results has become an urgent problem to be solved. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a three-phase electric energy meter that can track lost electricity, so as to solve the problem of how to improve the accuracy of clustering the active power time series data of the three-phase electric energy meter using the K-means clustering algorithm, so as to improve the power theft detection performance of the power grid based on the clustering results.

[0006] In an embodiment of the present invention, a three-phase electric energy meter capable of tracking electric power loss is provided, and the three-phase electric energy meter comprises:

[0007] A first data processing module is used to continuously acquire the active power time series of the three-phase electric energy meter under at least two preset cycles to form a sample set, and acquire the time correlation factor between every two samples according to the acquisition order of each sample in the sample set;

[0008] The second data processing module is used to perform average data window division on the active power time series corresponding to each of the samples for any two samples, obtain a multidimensional vector of each of the samples, perform dynamic time warping on the multidimensional vectors of the two samples using a DTW algorithm, obtain a corresponding optimal matching path, and obtain a correlation optimization factor between the two samples based on the optimal matching path;

[0009] A distance metric optimization module is used to optimize and adjust the time correlation factor between the two samples according to the correlation optimization factor between the two samples to obtain an optimized time correlation factor, and obtain an optimized distance metric between the multidimensional vectors of the two samples using the optimized time correlation factor and a preset Gaussian kernel function;

[0010] The power loss analysis module is used to perform K-means clustering on the multidimensional vectors of all samples based on the optimized distance metric between the multidimensional vectors of all samples and the preset optimal number of clusters, obtain corresponding clustering results, detect whether there is a suspected power theft cluster in the clustering results, and if it is detected that there is a suspected power theft cluster in the clustering results, obtain the total power loss in all preset cycles according to the suspected power theft cluster.

[0011] Preferably, the first data processing module obtains the time correlation factor between every two samples according to the acquisition order of each sample in the sample set, including:

[0012] For any two samples in the sample set, the absolute value of the difference in the acquisition order is calculated according to the acquisition order of the two samples, and the time decay constant is obtained according to the number of samples in the sample set. The time decay constant is used as the denominator and the absolute value of the difference in the acquisition order is used as the numerator to obtain the corresponding ratio. The opposite of the ratio is substituted into an exponential function with a natural constant as the base, and the result obtained is used as the time correlation factor between the two samples.

[0013] Preferably, the second data processing module respectively divides the active power time series corresponding to each sample into data windows on average to obtain a multidimensional vector of each sample, including:

[0014] For any one of the two samples, the active power time series sequence corresponding to the sample is evenly divided into M subsequences as data windows, and the active power mean of the corresponding data window is calculated based on all the active powers contained in each of the data windows, and the active power means of all the data windows are combined to form an M-dimensional vector of the sample.

[0015] Preferably, the second data processing module obtains the correlation optimization factor between the two samples based on the best matching path, including:

[0016] The best matching path includes all matching vector pairs between the multidimensional vectors of the two samples, and the active power change similarity between the two samples is obtained according to the active power difference between the two data windows corresponding to each matching vector pair;

[0017] Obtain a similarity difference between the active power change similarity between the two samples and a preset similarity threshold, use an exponential function with a natural constant as the base to negatively map the product of the similarity difference and a preset change coefficient to obtain a corresponding mapping value, and use the inverse of the addition result of the mapping value and the constant 1 as a correlation optimization factor between the two samples.

[0018] Preferably, the second data processing module obtains the active power change similarity between the two samples according to the active power difference between the two data windows corresponding to each of the matching vector pairs, including:

[0019] For any matching vector pair, two data windows corresponding to the matching vector pair are obtained, and according to the square of the difference between two active powers at any same position in the two data windows, a cumulative value of the square of the difference is obtained;

[0020] The accumulated values ​​of the squares of the differences corresponding to all the matching vector pairs are added to obtain the corresponding added results, and the inverse of the ratio result between the added results and the adjustment parameter is substituted into an exponential function with a natural constant as the base, and the obtained result is used as the active power change similarity between the two samples, wherein the method for obtaining the adjustment parameter is: obtaining the active power accumulated value of each sample in the sample set, and correspondingly obtaining the standard deviation of the active power accumulated values ​​of all samples, and the square of the standard deviation is the adjustment parameter.

[0021] Preferably, the distance metric optimization module optimizes and adjusts the time correlation factor between the two samples according to the correlation optimization factor between the two samples to obtain the optimized time correlation factor, including:

[0022] The product of the time correlation factor between the two samples and the correlation optimization factor is used as the optimized time correlation factor between the two samples.

[0023] Preferably, the distance metric optimization module uses the optimized time correlation factor and a preset Gaussian kernel function to obtain an optimized distance metric between the multidimensional vectors of the two samples, including:

[0024]

[0025] in, A multidimensional vector representing sample T and samples Multidimensional vector of The optimized distance metric between them, sqrt() represents the quadratic square root function, M represents the number of data windows of the sample, Represents the t-th data window of sample T in the multidimensional vector The corresponding vector in Representation sample Multidimensional vector of The vectors corresponding to the t-th data window of sample T in compose the vector of matching vector pairs, Denotes sample T and sample The optimized time correlation factor between them, K() represents the Gaussian kernel function.

[0026] Preferably, the power loss analysis module detects whether there is a suspected power theft cluster in the clustering result, including:

[0027] For any cluster in the clustering result, according to the multidimensional vector contained in the cluster, a multidimensional vector mean is obtained, and according to the multidimensional vector mean of each cluster, a cluster corresponding to the minimum multidimensional vector mean is taken as a target cluster;

[0028] According to the multidimensional vector mean of each cluster in the clustering result, the average value of the multidimensional vector means is calculated, and the ratio between the multidimensional vector mean of the target cluster and the average value is obtained. If the ratio is greater than a preset value, the target cluster is confirmed to be a suspected electricity theft cluster.

[0029] Preferably, the power loss analysis module obtains the total power loss in all preset cycles according to the power theft suspicion cluster, including:

[0030] The mean of the multidimensional vector means of all clusters in the clustering result except the suspected electricity theft cluster is obtained as the target value. For any multidimensional vector in the suspected electricity theft cluster, the difference between the mean of all vectors contained in the multidimensional vector and the target value is obtained, and the difference corresponding to each multidimensional vector in the suspected electricity theft cluster is accumulated, and the accumulated value obtained is used as the total power loss under all preset cycles.

[0031] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0032] The present invention provides a three-phase electric energy meter capable of tracking lost electricity, comprising a first data processing module, for continuously acquiring the active power time series of the three-phase electric energy meter under at least two preset cycles to form a sample set, and acquiring the time correlation factor between each two samples according to the acquisition order of each sample in the sample set; a second data processing module, for performing average data window division on the active power time series corresponding to each of the samples for any two samples, respectively, to obtain a multidimensional vector of each of the samples, and performing dynamic time warping on the multidimensional vectors of the two samples using a DTW algorithm to obtain a corresponding optimal matching path, and acquiring the correlation optimization factor between the two samples based on the optimal matching path; a distance metric optimization a optimization module, for optimizing and adjusting the time correlation factor between the two samples according to the correlation optimization factor between the two samples, to obtain the optimized time correlation factor, and obtaining the optimized distance metric between the multidimensional vectors of the two samples by using the optimized time correlation factor and a preset Gaussian kernel function; a power loss analysis module, for performing K-means clustering on the multidimensional vectors of all samples based on the optimized distance metric between the multidimensional vectors of all samples and a preset optimal number of clusters, to obtain corresponding clustering results, and detecting whether there is a suspected power theft cluster in the clustering result; if it is detected that there is a suspected power theft cluster in the clustering result, obtaining the total power loss under all preset cycles according to the suspected power theft cluster. Among them, by optimizing the distance metric in the K-means clustering algorithm based on time series correlation optimization and Gaussian kernel function, when temporary load fluctuations occur in the three-phase electricity meter, it is ensured that samples with similar power consumption patterns are correctly classified into the same clustering cluster during the clustering process. This enables the power grid to maintain stable power theft detection performance when facing power fluctuations caused by the connection or disconnection of high-power equipment, and avoid false alarms or omissions caused by accidental factors. This robustness enhances the stable operation capability of the power grid in a complex and dynamic power consumption environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0034] Figure 1 This is a structural block diagram of a three-phase electric energy meter capable of tracking lost electricity provided in Embodiment 1 of the present invention. DETAILED DESCRIPTION

[0035] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.

[0036] It should be noted that the terms "first", "second", etc. in the specification of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure.

[0037] In order to illustrate the technical solution of the present invention, specific embodiments are provided below for illustration.

[0038] See also Figure 1 , is a structural block diagram of a three-phase electric energy meter capable of tracking power loss provided by the first embodiment of the present invention, such as Figure 1 As shown, the three-phase electric energy meter may include:

[0039] The first data processing module 11 is used to continuously acquire the active power time series of the three-phase electric energy meter under at least two preset cycles to form a sample set, and acquire the time correlation factor between every two samples according to the acquisition order of each sample in the sample set.

[0040] According to the data acquisition equipment inside the three-phase electric energy meter, including current sensors, voltage sensors and power factor sensors, these sensors are used to collect power monitoring data such as current, voltage and power factor of the three-phase electric energy meter, so as to obtain the active power of the three-phase electric energy meter according to the current and voltage data, thereby obtaining an active power time series composed of the active power of the three-phase electric energy meter at each sampling moment. Preferably, taking one day as a preset cycle, the active power time series of the three-phase electric energy meter within one day is obtained according to the preset sampling frequency, and the active power time series of the three-phase electric energy meter for multiple days is continuously obtained. Preferably, the embodiment of the present invention continuously obtains the active power time series of the three-phase electric energy meter for one week.

[0041] The active power time series of the three-phase electric energy meter every day is regarded as a sample, and then a sample set can be obtained, and each sample in the sample set is numbered in the order of acquisition, such as 1, 2, 3, etc. It should be noted that before constructing the sample set, each active power time series can be cleaned, and outliers can be removed and missing values ​​can be filled for each active power time series to ensure data integrity.

[0042] After obtaining the sample set of the three-phase electric energy meter, k-means cluster analysis can be performed based on the sample set. In the k-means cluster analysis process, the temporal correlation between samples needs to be considered, that is, the closer the time span of the sample, the higher the correlation degree, and the greater the weight should be given. In the actual scenario, when a three-phase electric energy meter has a problem of electricity theft, continuous electricity theft will occur for a period of time afterwards, that is, the electricity theft behavior is often not an isolated time, but has a certain frequency and regularity within a period of time. Therefore, in the distance metric in the k-means cluster analysis, the closer the time interval of the sample is, the higher the temporal correlation factor is assigned. This temporal correlation factor helps to focus on the temporal characteristics of the electricity theft event, thereby improving the clustering accuracy of the electricity theft samples in the k-means clustering division process. Therefore, in the embodiment of the present invention, according to the acquisition order of each sample in the sample set, the temporal correlation factor between each two samples is obtained respectively, which is used to focus on the electricity theft event more accurately and improve the detection efficiency in the future.

[0043] Wherein, according to the acquisition order of each sample in the sample set, the time correlation factor between every two samples is obtained respectively, including:

[0044] For any two samples in the sample set, the absolute value of the difference in the acquisition order is calculated according to the acquisition order of the two samples, and the time decay constant is obtained according to the number of samples in the sample set. The time decay constant is used as the denominator and the absolute value of the difference in the acquisition order is used as the numerator to obtain the corresponding ratio. The opposite of the ratio is substituted into an exponential function with a natural constant as the base, and the result obtained is used as the time correlation factor between the two samples.

[0045] In one embodiment, the sample T and the sample For example, according to sample T and sample The difference in the order of acquisition between, acquiring sample T and sample The time correlation factor between them is calculated as follows:

[0046]

[0047] in, Denotes sample T and sample The time correlation factor between them, exp() represents an exponential function with a natural constant as the base, represents the order in which samples T are obtained, Representation sample The order of obtaining, | | represents the absolute value symbol, represents the time decay constant.

[0048] The time decay constant is twice the number of samples in the sample set, that is, , where Z is the number of samples in the sample set, which is used to determine the decay rate of time correlation as the time span increases, and can be adjusted according to actual needs.

[0049] It should be noted that when the time span of the acquisition sequence between samples is small, that is, the acquisition time between samples is close, will be close to 1, which means that the correlation between the two samples should be strengthened; when the time span between samples gradually increases, It will gradually decrease, weakening the correlation between samples, reflecting that the longer the interval between sample acquisitions, the lower the correlation, and the smaller the corresponding time correlation factor.

[0050] At this point, the time correlation factor between any two samples in the sample set can be obtained.

[0051] The second data processing module 12 is used to, for any two samples, respectively divide the active power time series corresponding to each of the samples into average data windows to obtain a multidimensional vector of each of the samples, and use the DTW algorithm to dynamically time warp the multidimensional vectors of the two samples to obtain the corresponding optimal matching path, and based on the optimal matching path, obtain the correlation optimization factor between the two samples.

[0052] Considering that when using the time correlation factor for distance measurement in k-means cluster analysis, K-means cluster analysis that relies solely on the Euclidean distance optimized by time series correlation will face power peaks and valleys in a short period of time (corresponding to situations such as power theft or continuous connection and disconnection of power equipment during peak and valley periods of power consumption), even two samples with similar overall power consumption patterns will be mistakenly classified into different clusters due to the short-term fluctuations that affect the distance calculation, thereby reducing the accuracy of cluster division. Therefore, in order to improve the accuracy of cluster division, it is necessary to first optimize the time correlation factor between samples, and then optimize the distance measurement in k-means cluster analysis.

[0053] The embodiment of the present invention optimizes the time correlation factor by obtaining the correlation optimization factor through the data window of the sample. Therefore, for any two samples, first, the active power time series corresponding to each of the samples is evenly divided into the data window to obtain a multi-dimensional vector of each of the samples. Then, the multi-dimensional vectors of the two samples are dynamically time-warped using the DTW algorithm to obtain the corresponding optimal matching path. Based on the optimal matching path, the correlation optimization factor between the two samples is obtained.

[0054] The active power time series corresponding to each sample is respectively divided into data windows on average to obtain a multidimensional vector of each sample, including:

[0055] For any one of the two samples, the active power time series sequence corresponding to the sample is evenly divided into M subsequences as data windows, and the active power mean of the corresponding data window is calculated based on all the active powers contained in each of the data windows, and the active power means of all the data windows are combined to form an M-dimensional vector of the sample.

[0056] In one embodiment, the sample T and the sample For example, for any of the two samples, the active power time series corresponding to the sample is evenly divided into 96 subsequences according to the time interval of 15 minutes. One subsequence is a data window, that is, M=96. The wth active power data in the tth data window in sample T is recorded as At this time, 96 data windows of the active power time series corresponding to the sample are obtained. In order to reduce the amount of calculation and analysis, the feature vector is extracted for each data window of the sample. Specifically, for any data window, the mean active power is calculated as the feature vector of the data window according to all the active powers contained in the data window. Then, the 96 data windows of the sample correspond to 96 feature vectors to form a 96-dimensional vector of the sample. The 96-dimensional vector of sample T is recorded as ,in Represents the 96-dimensional vector of sample T, represents the mean active power corresponding to the first data window of sample T, represents the mean active power corresponding to the second data window of sample T, represents the mean active power corresponding to the t-th data window of sample T, represents the mean active power corresponding to the 96th data window of sample T. Similarly, we can also get The 96-dimensional vector .

[0057] The multidimensional vectors of the two samples are dynamically time warped using the DTW algorithm to obtain a corresponding optimal matching path, and a correlation optimization factor between the two samples is obtained based on the optimal matching path, including:

[0058] (1) The best matching path includes all matching vector pairs between the multidimensional vectors of the two samples, and the active power change similarity between the two samples is obtained according to the active power difference between the two data windows corresponding to each matching vector pair.

[0059] Wherein, obtaining the active power change similarity between the two samples according to the active power difference between the two data windows corresponding to each matching vector pair includes:

[0060] For any matching vector pair, two data windows corresponding to the matching vector pair are obtained, and according to the square of the difference between two active powers at any same position in the two data windows, a cumulative value of the square of the difference is obtained;

[0061] The accumulated values ​​of the squares of the differences corresponding to all the matching vector pairs are added to obtain the corresponding added results, and the inverse of the ratio result between the added results and the adjustment parameter is substituted into an exponential function with a natural constant as the base, and the obtained result is used as the active power change similarity between the two samples, wherein the method for obtaining the adjustment parameter is: obtaining the active power accumulated value of each sample in the sample set, and correspondingly obtaining the standard deviation of the active power accumulated values ​​of all samples, and the square of the standard deviation is the adjustment parameter.

[0062] In one embodiment, the traditional Euclidean distance metric is dominated by the difference between individual short-term fluctuations when calculating the distance of clusters. Considering that electricity theft may occur repeatedly over a period of time and has similar electricity consumption patterns, it is necessary to strengthen the connection between samples that are close in time and have similar electricity fluctuation characteristics. Therefore, by performing the best matching mode on the data window between the two samples, the mismatch problem caused by performing the best matching mode only based on the timestamp correspondence between the samples is corrected. Specifically, the DTW algorithm is used to perform the best matching mode on the multidimensional vector of sample T and the sample The multidimensional vector of sample T is dynamically time-warped to obtain the best matching path. It is worth noting that the best matching path refers to the multidimensional vector of sample T and sample Vector matching is performed on the multi-dimensional vector of , and multiple matching vector pairs are obtained accordingly. This process belongs to the index of the alignment path in the DTW algorithm, which is a prior art and will not be described here.

[0063] After determining the multidimensional vector and sample T of sample After all matching vector pairs between the multidimensional vectors are found, that is, after the analysis of the best matching pattern between the two samples is completed, since one vector in the multidimensional vector corresponds to a data window, it is equivalent to determining the sample T and the sample The matching results of the data windows between the two data windows are obtained, and then the active power difference between the two data windows corresponding to each matching vector pair is analyzed. The similarity of power fluctuation patterns in the time series corresponds to sample T and sample The active power variation similarity between samples T and The calculation expression of the active power change similarity between is:

[0064]

[0065] in, Denotes sample T and sample The similarity of active power changes between them, exp() represents an exponential function with a natural constant as the base, M represents the number of data windows of the sample, W represents the amount of active power contained in a data window, represents the wth active power data in the tth data window in sample T, Representation sample The first data window in the sample T that matches the tth data window The wth active power data in the data window, Represents an adjustment parameter used to control similarity sensitivity. value to reduce the sensitivity to active power fluctuations.

[0066] It should be noted that the smaller the active power difference between each two matching data windows between samples, the similarity of the power consumption patterns between the corresponding two data windows. Similarly, the smaller the sum of the active power differences between all two matching data windows between samples, the similarity of the active power changes corresponding to the two samples, and the greater the similarity of the corresponding active power changes.

[0067] (2) Obtaining a similarity difference between the active power change similarity between the two samples and a preset similarity threshold, using an exponential function with a natural constant as the base, negatively mapping the product of the similarity difference and a preset change coefficient to obtain a corresponding mapping value, and using the inverse of the addition result of the mapping value and the constant 1 as a correlation optimization factor between the two samples.

[0068] In one embodiment, after obtaining sample T and sample After the active power change similarity between samples T and samples The active power change similarity between samples T and The correlation optimization factor between samples T and The time correlation factor between samples T and samples The active power change similarity between samples T and The correlation optimization factor between them is calculated as follows:

[0069]

[0070] in, Denotes sample T and sample The correlation optimization factor between them, exp() represents an exponential function with a natural constant as the base, 1 represents a constant, Indicates the preset coefficient of change, used to control , follow The change rate is preferably set to 10. Denotes sample T and sample The similarity of active power changes between Indicates the preset similarity threshold, which is preferably set to 0.6.

[0071] It should be noted that when When , it indicates that sample T and sample resemblance, The value of is close to 1 and should be given a higher weight, corresponding to sample T and sample The larger the correlation optimization factor between , represents sample T and sample The similarity between them is low. The value of is close to 0 and should not be overweighted, corresponding to sample T and sample The smaller the correlation optimization factor.

[0072] At this point, the correlation optimization factor between any two samples can be obtained.

[0073] The distance metric optimization module 13 is used to optimize and adjust the time correlation factor between the two samples according to the correlation optimization factor between the two samples to obtain the optimized time correlation factor, and use the optimized time correlation factor and a preset Gaussian kernel function to obtain the optimized distance metric between the multidimensional vectors of the two samples.

[0074] After obtaining the correlation optimization factor between any two samples in the sample set, the time correlation factor between the two samples can be optimized and adjusted according to the correlation optimization factor between the two samples to obtain the optimized time correlation factor. The method for obtaining the optimized time correlation factor is: taking the product of the time correlation factor between the two samples and the correlation optimization factor as the optimized time correlation factor between the two samples.

[0075] In one embodiment, the calculation expression of the optimized time correlation factor between two samples is:

[0076]

[0077] in, Denotes sample T and sample The optimized time correlation factor between Denotes sample T and sample The time correlation factor between Denotes sample T and sample The correlation optimization factor between them.

[0078] It should be noted that using sample T and sample The correlation optimization factor between sample T and sample The time correlation factor between the samples is optimized and adjusted, so that the optimized time correlation factor not only takes into account the time span between samples, but also takes into account the similarity of electricity usage behaviors between samples, which helps to more accurately identify potential electricity theft behaviors.

[0079] Similarly, the optimized correlation optimization factor between any two samples in the sample set is obtained, and then the embodiment of the present invention introduces a Gaussian kernel function to optimize the distance metric during K-means clustering analysis. Through the "compression" effect of the kernel function, the influence of short-term fluctuations on the distance result is suppressed, making the distance calculation more robust and better reflecting the overall similarity of the samples. Therefore, all optimized time correlation factors and the preset Gaussian kernel function are used to obtain the optimized distance metric between the multidimensional vectors of any two samples.

[0080] Among them, the calculation expression of the optimized distance metric between the multidimensional vectors of any two samples is:

[0081]

[0082] in, A multidimensional vector representing sample T and samples Multidimensional vector of The optimized distance metric between them, sqrt() represents the quadratic square root function, M represents the number of data windows of the sample, Represents the t-th data window of sample T in the multidimensional vector The corresponding vector in Representation sample Multidimensional vector of The vectors corresponding to the t-th data window of sample T in compose the vector of matching vector pairs, Denotes sample T and sample The optimized time correlation factor between them, K() represents the Gaussian kernel function.

[0083] The Gaussian kernel function K() is: , where x=y=any vector in the multidimensional vector (mean value of active power), for example: , , It is worth noting that the Gaussian kernel function belongs to the prior art and will not be described in detail here. , which can be adjusted according to the active power data values ​​and clustering effects of different loads.

[0084] It should be noted that after obtaining the time correlation factor using the active power time series collected by the three-phase electric energy meter, the specific pattern of the sample cannot be accurately distinguished, but the connection between samples with a short time span is enhanced. Therefore, in the distance calculation of this step, it is also necessary to analyze according to the data characteristics of the continuous electricity theft behavior. In the case of electricity theft, the active power data collected will also fluctuate over time. Specifically, in order to ensure the concealment of electricity theft, the electricity theft user will not use the electric power to zero except gradually reducing the active power when the electricity theft occurs, and generally maintain it at a low value. These data will also fluctuate with the activities of the personnel, but the fluctuation is small to simulate the phenomenon of less electricity consumption. In addition, electricity theft is a continuous action. The correlation optimization factor obtained according to the difference in the fluctuation characteristics of the active power data of the corresponding data window is used to optimize the time correlation factor, so that the electricity theft sample point is clustered as the center point in the clustering iteration process, and it is easy to cluster similar sample points into one class, thereby increasing the clustering performance of the electricity theft cluster.

[0085] So far, the optimized distance metric between the multidimensional vectors of every two samples when K-means clustering is performed on the multidimensional vectors of all samples is obtained.

[0086] The power loss analysis module 14 is used to perform K-means clustering on the multidimensional vectors of all samples based on the optimized distance metric between the multidimensional vectors of all samples and the preset optimal number of clusters, obtain corresponding clustering results, detect whether there is a suspected power theft cluster in the clustering results, and if it is detected that there is a suspected power theft cluster in the clustering results, obtain the total power loss in all preset cycles according to the suspected power theft cluster.

[0087] One of the important parameters in the K-means clustering algorithm is the optimal value of the number of clusters K. The embodiment of the present invention obtains the number of clusters K for clustering the multidimensional vectors of all samples according to the elbow rule, and specifically determines the optimal K value by finding the turning point where the sum of squared errors (SSE) suddenly drops, wherein the sum of squared errors (SSE) is the sum of the squares of the distances from each point to its nearest cluster center. It is worth noting that the determination of the number of clusters K according to the elbow rule belongs to the prior art and will not be described in detail here.

[0088] After obtaining the optimized distance metric between the multidimensional vectors of all samples and the optimal number of clusters K in the K-means clustering algorithm, K-means clustering is performed on the multidimensional vectors of all samples based on the optimized distance metric between the multidimensional vectors of all samples and the preset optimal number of clusters to obtain corresponding clustering results. It is worth noting that K-means clustering belongs to the existing technology and will not be described in detail here.

[0089] The clustering results include multiple clusters, one cluster corresponds to a power usage pattern, and may include clusters of normal power usage patterns and clusters of potential power theft behaviors. Therefore, it is necessary to detect whether there are suspected power theft clusters in the clustering results, and then track the power loss based on the detection of the suspected power theft clusters.

[0090] Among them, whether there is a suspected electricity theft cluster in the clustering results is detected, including:

[0091] For any cluster in the clustering result, according to the multidimensional vector contained in the cluster, obtain the multidimensional vector mean, and according to the multidimensional vector mean of each cluster, take the cluster corresponding to the minimum multidimensional vector mean as the target cluster;

[0092] According to the multidimensional vector mean of each cluster in the clustering result, the average value of the multidimensional vector means is calculated, and the ratio between the multidimensional vector mean of the target cluster and the average value is obtained. If the ratio is greater than a preset value, the target cluster is confirmed to be a suspected electricity theft cluster.

[0093] In one embodiment, considering that there are M active power means in the multidimensional vector of the sample, the average value of the active power means is calculated as the multidimensional vector mean of the corresponding cluster for the M active power means of all multidimensional vectors contained in each cluster, and the multidimensional vector mean of each cluster is compared, and the cluster corresponding to the minimum multidimensional vector mean is taken as the target cluster.

[0094] At the same time, according to the multidimensional vector means of all cluster clusters, the average value of the multidimensional vector means is calculated , calculate the multidimensional vector mean of the target cluster and average The ratio between , if the ratio If the ratio is greater than 2, the target cluster is confirmed to be a suspected power theft cluster, indicating that the power consumption pattern corresponding to this cluster is abnormal and there is a suspicion of power theft. The user of this three-phase energy meter needs to pay special attention to its power consumption and then track the power loss. On the contrary, if the ratio is If it is less than or equal to 2, it means that the power consumption of the user to which this three-phase electricity meter is mounted is normal and there is no need to track power loss.

[0095] After identifying the suspected power theft cluster, the total power loss in all preset periods (within one week) is analyzed according to the power consumption of the suspected power theft cluster, and the total power loss in all preset periods is obtained, including:

[0096] The mean of the multidimensional vector means of all clusters in the clustering result except the suspected electricity theft cluster is obtained as the target value. For any multidimensional vector in the suspected electricity theft cluster, the difference between the mean of all vectors contained in the multidimensional vector and the target value is obtained, and the difference corresponding to each multidimensional vector in the suspected electricity theft cluster is accumulated, and the accumulated value obtained is used as the total power loss under all preset cycles.

[0097] In one embodiment, the total power loss under all preset cycles is calculated as follows:

[0098]

[0099] Where V represents the total power loss under all preset cycles. Represents the mean of the multidimensional vector means of all clusters except the suspected electricity theft cluster in the clustering results, represents the mean of all vectors contained in the ith multidimensional vector in the electricity theft suspect cluster, Represents the number of multidimensional vectors in the electricity theft suspect cluster.

[0100] It should be noted that after obtaining the total power loss under all preset cycles, subsequent power theft detection can be performed based on the obtained total power loss. This is not the focus of the invention and will not be described in detail.

[0101] In summary, an embodiment of the present invention provides a three-phase electric energy meter capable of tracking power loss, comprising a first data processing module, for continuously acquiring active power time series sequences of the three-phase electric energy meter under at least two preset cycles to form a sample set, and acquiring the time correlation factor between every two samples according to the acquisition order of each sample in the sample set; a second data processing module, for, for any two samples, performing average data window division on the active power time series sequences corresponding to each of the samples, respectively, to obtain a multidimensional vector of each of the samples, performing dynamic time warping on the multidimensional vectors of the two samples using a DTW algorithm, to obtain a corresponding optimal matching path, and acquiring the correlation optimization factor between the two samples based on the optimal matching path; a distance metric optimization module, for optimizing and adjusting the time correlation factor between the two samples according to the correlation optimization factor between the two samples, to obtain the optimized time correlation factor, and obtaining the optimized distance metric between the multidimensional vectors of the two samples using the optimized time correlation factor and a preset Gaussian kernel function; a power loss analysis module, for performing K-means clustering on the multidimensional vectors of all samples based on the optimized distance metric between the multidimensional vectors of all samples and a preset optimal number of clusters, to obtain corresponding clustering results, and detecting whether there is a suspected power theft cluster in the clustering result; if it is detected that there is a suspected power theft cluster in the clustering result, obtaining the total power loss under all preset cycles according to the suspected power theft cluster. Among them, by optimizing the distance metric in the K-means clustering algorithm based on time series correlation optimization and Gaussian kernel function, when temporary load fluctuations occur in the three-phase electricity meter, it is ensured that samples with similar power consumption patterns are correctly classified into the same clustering cluster during the clustering process. This enables the power grid to maintain stable power theft detection performance when facing power fluctuations caused by the connection or disconnection of high-power equipment, and avoid false alarms or omissions caused by accidental factors. This robustness enhances the stable operation capability of the power grid in a complex and dynamic power consumption environment.

[0102] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.

Claims

1. A three-phase electric energy meter capable of tracking electric energy loss, characterized in that: The three-phase electric energy meter comprises: A first data processing module is used to continuously acquire the active power time series of the three-phase electric energy meter under at least two preset cycles to form a sample set, and acquire the time correlation factor between every two samples according to the acquisition order of each sample in the sample set; The second data processing module is used to perform average data window division on the active power time series corresponding to each of the samples for any two samples, obtain a multidimensional vector of each of the samples, perform dynamic time warping on the multidimensional vectors of the two samples using a DTW algorithm, obtain a corresponding optimal matching path, and obtain a correlation optimization factor between the two samples based on the optimal matching path; A distance metric optimization module is used to optimize and adjust the time correlation factor between the two samples according to the correlation optimization factor between the two samples to obtain an optimized time correlation factor, and obtain an optimized distance metric between the multidimensional vectors of the two samples using the optimized time correlation factor and a preset Gaussian kernel function; The power loss analysis module is used to perform K-means clustering on the multidimensional vectors of all samples based on the optimized distance metric between the multidimensional vectors of all samples and the preset optimal number of clusters to obtain corresponding clustering results, detect whether there is a suspected power theft cluster in the clustering results, and if it is detected that there is a suspected power theft cluster in the clustering results, obtain the total power loss in all preset cycles according to the suspected power theft cluster; According to the acquisition order of each sample in the sample set, a time correlation factor between every two samples is respectively obtained, including: For any two samples in the sample set, the absolute value of the difference in the acquisition order is calculated according to the acquisition order of the two samples, and the time decay constant is obtained according to the number of samples in the sample set. The time decay constant is used as the denominator and the absolute value of the difference in the acquisition order is used as the numerator to obtain the corresponding ratio. The opposite of the ratio is substituted into an exponential function with a natural constant as the base, and the result obtained is used as the time correlation factor between the two samples.

2. A three-phase electric energy meter capable of tracking electric power loss according to claim 1, characterized in that: The second data processing module respectively divides the active power time series corresponding to each sample into data windows on average to obtain a multidimensional vector of each sample, including: For any one of the two samples, the active power time series sequence corresponding to the sample is evenly divided into M subsequences as data windows, and the active power mean of the corresponding data window is calculated based on all the active powers contained in each of the data windows, and the active power means of all the data windows are combined to form an M-dimensional vector of the sample.

3. A three-phase electric energy meter capable of tracking electric power loss according to claim 1, characterized in that: The second data processing module obtains a correlation optimization factor between the two samples based on the best matching path, including: The best matching path includes all matching vector pairs between the multidimensional vectors of the two samples, and the active power change similarity between the two samples is obtained according to the active power difference between the two data windows corresponding to each matching vector pair; Obtain a similarity difference between the active power change similarity between the two samples and a preset similarity threshold, use an exponential function with a natural constant as the base to negatively map the product of the similarity difference and a preset change coefficient to obtain a corresponding mapping value, and use the inverse of the addition result of the mapping value and the constant 1 as a correlation optimization factor between the two samples.

4. A three-phase electric energy meter capable of tracking electric power loss according to claim 3, characterized in that: The second data processing module obtains the active power change similarity between the two samples according to the active power difference between the two data windows corresponding to each matching vector pair, including: For any matching vector pair, two data windows corresponding to the matching vector pair are obtained, and according to the square of the difference between two active powers at any same position in the two data windows, a cumulative value of the square of the difference is obtained; The accumulated values ​​of the squares of the differences corresponding to all the matching vector pairs are added to obtain the corresponding added results, and the inverse of the ratio result between the added results and the adjustment parameter is substituted into an exponential function with a natural constant as the base, and the obtained result is used as the active power change similarity between the two samples, wherein the method for obtaining the adjustment parameter is: obtaining the active power accumulated value of each sample in the sample set, and correspondingly obtaining the standard deviation of the active power accumulated values ​​of all samples, and the square of the standard deviation is the adjustment parameter.

5. A three-phase electric energy meter capable of tracking electric power loss according to claim 1, characterized in that: The distance metric optimization module optimizes and adjusts the time correlation factor between the two samples according to the correlation optimization factor between the two samples to obtain the optimized time correlation factor, including: The product of the time correlation factor between the two samples and the correlation optimization factor is used as the optimized time correlation factor between the two samples.

6. A three-phase electric energy meter capable of tracking electric power loss according to claim 3, characterized in that: The distance metric optimization module uses the optimized time correlation factor and a preset Gaussian kernel function to obtain an optimized distance metric between the multidimensional vectors of the two samples, including: ; in, A multidimensional vector representing sample T and samples Multidimensional vector of The optimized distance metric between them, sqrt() represents the quadratic square root function, M represents the number of data windows of the sample, Represents the t-th data window of sample T in the multidimensional vector The corresponding vector in Representation sample Multidimensional vector of The vectors corresponding to the t-th data window of sample T in compose the vector of matching vector pairs, Denotes sample T and sample The optimized time correlation factor between them, K() represents the Gaussian kernel function.

7. A three-phase electric energy meter capable of tracking electric power loss according to claim 1, characterized in that: The power loss analysis module detects whether there is a suspected power theft cluster in the clustering result, including: For any cluster in the clustering result, according to the multidimensional vector contained in the cluster, a multidimensional vector mean is obtained, and according to the multidimensional vector mean of each cluster, a cluster corresponding to the minimum multidimensional vector mean is taken as a target cluster; According to the multidimensional vector mean of each cluster in the clustering result, the average value of the multidimensional vector means is calculated, and the ratio between the multidimensional vector mean of the target cluster and the average value is obtained. If the ratio is greater than a preset value, the target cluster is confirmed to be a suspected electricity theft cluster.

8. A three-phase electric energy meter capable of tracking electric power loss according to claim 7, characterized in that: The power loss analysis module obtains the total power loss in all preset cycles according to the power theft suspect cluster, including: The mean of the multidimensional vector means of all clusters in the clustering result except the suspected electricity theft cluster is obtained as the target value. For any multidimensional vector in the suspected electricity theft cluster, the difference between the mean of all vectors contained in the multidimensional vector and the target value is obtained. The difference corresponding to each multidimensional vector in the suspected electricity theft cluster is accumulated, and the accumulated value obtained is used as the total power loss under all preset cycles.

Citation Information

Patent Citations

  • Method of short-term power grid load prediction model

    CN116090597A

  • Distinguishing method for zoning frequency stability of electric power system

    CN117060440A