Electric energy meter misalignment diagnosis method, electronic equipment and storage medium
By combining the denoising encoder and neural network model with the K-means clustering method, a lightweight electric energy meter misalignment diagnosis model is constructed, which solves the problems of traditional diagnosis methods such as low efficiency, dependence on manual labor and insufficient data processing capabilities, and realizes electric energy Automatic diagnosis and real-time monitoring of meter misalignment improve diagnostic efficiency and accuracy.
Patent Information
- Application Number
- CN202410892402.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-09-10
AI Technical Summary
Traditional energy meter misaccuracy diagnosis methods lack initiative, rely on manual operations, are difficult to deal with complex causes, and have limited data processing capabilities, resulting in low efficiency, high cost, large time consumption, and difficulty in achieving real-time monitoring and timely intervention.
Using the denoising encoder model and neural network model combined with the K-means clustering method, a lightweight electric energy meter misalignment diagnosis model is constructed. The residuals are calculated through noise reduction processing and fitting relationships, and the misalignment threshold is determined to achieve automated diagnosis. Reduce reliance on professionals.
It improves the efficiency and accuracy of misalignment diagnosis of electric energy meters, can diagnose minor internal damage and external interference of electric energy meters, reduces operation and maintenance costs and time consumption, enhances data processing capabilities, and enables real-time monitoring and timely intervention.
Smart Images

Figure CN118628835A
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of intelligent electric energy meter detection, and relates to an electric energy meter misalignment diagnosis method, electronic equipment and storage medium. Background Art
[0002] As one of the core components of smart grid, smart energy meter is not only responsible for accurate energy metering, collecting and transmitting electricity consumption information, but also can realize comprehensive supervision and management of power grid operation status through built-in advanced functions such as remote meter reading, real-time monitoring, demand response and fault diagnosis. This device can effectively predict the load of the power grid and optimize the allocation of power resources by analyzing the power consumption data, thereby improving the economy and reliability of the power grid. At the same time, smart energy meter can also monitor the quality of power and provide data support for the early detection and prevention of power grid failures. In addition, smart energy meter also supports a variety of billing schemes, encouraging users to use electricity when the grid load is low, which helps to balance the grid load and reduce dependence on high-carbon emission power sources. Therefore, the efficient operation of smart energy meter is of vital importance to safeguard the interests of users and grid operators and promote energy conservation and emission reduction. Continuous detection and analysis of the operating status of smart energy meter can timely discover and solve problems, ensure the stability and safety of the power grid, and also help to improve service quality and user satisfaction.
[0003] However, the diagnosis of meter inaccuracy faces multiple challenges and shortcomings. First, diagnostic technology relies on high-precision measurement equipment and complex data processing algorithms, which not only increases the cost of operation and maintenance, but also requires maintenance personnel to have a high level of technical skills. Secondly, most of the existing diagnostic methods are reactive, that is, action is taken only after user complaints or problems are found during routine inspections. This approach makes it difficult to achieve real-time monitoring and timely intervention. In addition, after the large-scale deployment of smart meters, the massive amount of data generated poses a huge challenge to data storage, processing and analysis, especially in terms of data quality and security. The reasons for meter inaccuracy are complex and varied, including equipment aging, external interference, improper installation, etc., which makes the diagnostic process complicated and time-consuming.
[0004] In summary, the traditional method of diagnosing inaccuracy of electric energy meters has the following main disadvantages: (1) Reactive diagnosis: Traditional methods usually only discover problems when users complain or perform routine inspections. They lack proactive prediction and real-time monitoring capabilities, which results in the inability to detect and resolve misalignment problems in a timely manner. (2) Dependence on manual labor: Many traditional diagnostic methods require professionals to perform and interpret the results on site, which is not only inefficient but also easily affected by subjective judgment, increasing diagnostic uncertainty and labor costs; (3) Technical limitations: Traditional diagnostic techniques are often unable to handle complex causes of misalignment, such as minor damage inside the meter or interference from the external environment, especially when the power grid environment is complex and changeable; (4) Limited data processing capabilities: As the number of electricity meters increases, traditional methods face challenges in data collection, storage, and analysis, making it difficult to effectively manage and utilize large amounts of data for in-depth analysis; (5) High cost and time consumption: Traditional diagnostic methods usually require power outage, which not only causes inconvenience to users and grid operators, but also increases the cost and time consumption of the diagnostic process. Summary of the invention
[0005] The present invention is used to solve the problem of low efficiency of the traditional electric energy meter misalignment diagnosis method.
[0006] The present invention solves the above technical problems through the following technical solutions: A method for diagnosing misalignment of an electric energy meter comprises the following steps: Step 1: Obtain the sampling value and actual measurement value of the normally operating electric energy meter as sample data; Step 2: training a denoising encoder model for denoising the power meter misalignment diagnosis data; Step 3: construct a neural network model to fit the relationship between the electric energy meter sampling value and the measured value and calculate the residual; Step 4: Determine the inaccuracy threshold of the electric energy meter using the K-means clustering method; Step 5: The measured value of the electric energy meter to be diagnosed is subjected to a denoising encoder model to obtain denoised measured value data, the neural network model is combined with the electric energy meter inaccuracy threshold control limit to obtain an electric energy meter inaccuracy diagnosis model, and the measured value of the electric energy meter to be diagnosed is input into the electric energy meter inaccuracy diagnosis model to obtain the electric energy meter inaccuracy probability.
[0007] Furthermore, the sampling value and the actual measurement value of the normal running electric energy meter in step 1 are respectively recorded as and ; Indicates the energy meter Sample values, Indicates the energy meter The actual measured value, The value of is 1,2…n, Indicates the data length.
[0008] Furthermore, the method for training the denoising encoder model in step 2 for denoising the electric energy meter misalignment diagnosis data is specifically as follows: Step 2.1: Generate noisy data; obtain the actual measured value Adding Noise , get the actual measurement value containing noise ; Step 2.2: Reduce the dimension of the actual measurement value containing noise according to formula (1) to obtain a low-dimensional vector as follows: (1) in, represents the weight of the encoder, Indicates the encoder offset, is the activation function; Step 2.3, reconstruct the output data from the low-dimensional vector according to formula (2), and train the denoising encoder model, and update the parameters of the model by minimizing the loss function. The loss function is shown in formula (3): (2) (3) in, represents the weight of the decoder, Represents the bias of the decoder.
[0009] Furthermore, the method of constructing a neural network model to fit the relationship between the electric energy meter sampling value and the measured value and calculating the residual in step 3 is specifically as follows: Step 3.1: Get the sample value of the electric energy meter and actual measured values Normalize and get the normalized sampling value data vector and the actual measured value vector ; The normalized formula is as follows: (4) in, Indicates the sampling value of the energy meter and the actual measured value The values, and Respectively represent the sampling values of the electric energy meter and the actual measured value The maximum and minimum values in Indicates the value after normalization of data; Step 3.2: Construct a neural network model. The structure of the neural network model is one input layer, and the number of neurons in the input layer is , 2 hidden layers, the number of neurons in the first hidden layer is 64, and the RELU function is used as the activation function. The number of neurons in the second hidden layer is 32, and the RELU function is used as the activation function. There is 1 output layer, and the number of neurons in the output layer is ; Step 3.3: Run the neural network model and fit the sampled values and actual measured values The input is the actual measured value of the electric energy meter. , the output is the predicted value of the electric energy meter sampling value ,in, The neural network model predicts the energy meter The neural network model is calculated by using formula (5). The predicted sample value and The residual of the actual sample value as follows: (5) So we get the residual vector .
[0010] Furthermore, the method for determining the electric energy meter inaccuracy threshold by using the K-means clustering method in step 4 is specifically as follows: Step 4.1: Initialization The initial cluster centers are as follows: (6) The coordinates of each initial cluster center are as follows: (7) in, Indicates Cluster centers, Indicates The coordinates of the cluster centers, The value of is 1,2…k; Step 4.2: Determine each residual arrive The Euclidean distance between cluster centers , and assign the data point to the cluster to which the nearest cluster center belongs; each residual arrive The Euclidean distance between cluster centers The calculation formula is as follows: (8) Step 4.3: Get the optimal solution through iteration. The coordinates of the cluster centers are as follows: (9) Step 4.4: Determine the inaccuracy threshold control limit of the electric energy meter as follows: (10) in, is the inaccuracy threshold control limit of the electric energy meter.
[0011] Furthermore, the calculation formula of the electric energy meter inaccuracy probability in step 5 is as follows: (11) in, is the total length of the test data, The test data exceeds the electric energy meter inaccuracy threshold control limit The data length.
[0012] An electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above-mentioned electric energy meter misalignment diagnosis method, and the processor is configured to execute the program stored in the memory.
[0013] A storage medium having a computer program stored thereon, characterized in that the computer program executes the steps of the above-mentioned method for diagnosing inaccuracy of an electric energy meter when the computer program is executed by a processor.
[0014] The advantages of the present invention are: In view of the shortcomings of existing electricity meter misalignment diagnosis methods such as lack of initiative and reliance on manual work, the present invention adopts a neural network to diagnose electricity meter misalignment. It can diagnose minor damage inside the electricity meter and external environmental interference, and does not require professional personnel to operate on-site and interpret the results, thereby greatly improving the efficiency of diagnosis.
[0015] The present invention takes into account the shortcomings of existing neural networks in diagnosing electric energy meter misalignment, such as high cost and time consumption and limited data processing capability, and constructs a lightweight neural network suitable for electric energy meters. The neural network has the advantages of high operating efficiency, strong data processing capability, and low resource occupation, which reduces the burden on the operation of the electric energy meter and improves the accuracy of the electric energy meter misalignment diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a flow chart of the electric energy meter misalignment diagnosis method of the present invention; Figure 2 A neural network structure diagram of the electric energy meter misalignment diagnosis method of the present invention; Figure 3 It is a test effect diagram of the electric energy meter misalignment diagnosis method of the present invention when the first block of electric energy meter data to be diagnosed is used; Figure 4 This is a test effect diagram of the electric energy meter misalignment diagnosis method of the present invention when using the second block of electric energy meter data to be diagnosed. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in combination with the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and specific embodiments: Embodiment 1 like Figure 1 As shown, the electric energy meter misalignment diagnosis method according to the embodiment of the present invention comprises the following steps: Step 1: Obtain the sampling value and actual measurement value of the normally operating electric energy meter as sample data; the sampling value and actual measurement value of the normally operating electric energy meter are respectively recorded as and ; Indicates the energy meter Sample values, Indicates the energy meter The actual measured value, The value of is 1,2…n, Indicates the data length.
[0019] Step 2: training a denoising encoder model for denoising the power meter misalignment diagnosis data; Step 2.1: Generate noisy data; obtain the actual measured value Adding Noise , get the actual measurement value containing noise ; Step 2.2: Reduce the dimension of the actual measurement value containing noise according to formula (1) to obtain a low-dimensional vector as follows: (1) in, represents the weight of the encoder, Indicates the encoder offset, is the activation function.
[0020] Step 2.3, reconstruct the output data from the low-dimensional vector according to formula (2), and train the denoising encoder model, and update the parameters of the model by minimizing the loss function. The loss function is shown in formula (3): (2) (3) in, represents the weight of the decoder, Represents the bias of the decoder.
[0021] Step 3: construct a neural network model to fit the relationship between the electric energy meter sampling value and the measured value and calculate the residual; Step 3.1, normalization of data; The sample value of the energy meter is obtained and actual measured values Normalize and get the normalized sampling value data vector and the actual measured value vector ; The normalized formula is as follows: (4) in, Indicates the sampling value of the energy meter and the actual measured value The values, and Respectively represent the sampling values of the electric energy meter and the actual measured value The maximum and minimum values in Indicates the value after normalization of data.
[0022] Step 3.2: Build a neural network model, such as Figure 2 As shown, the structure of the neural network model in this embodiment is one input layer, and the number of neurons in the input layer is , 2 hidden layers, the number of neurons in the first hidden layer is 64, and the RELU function is used as the activation function. The number of neurons in the second hidden layer is 32, and the RELU function is used as the activation function. There is 1 output layer, and the number of neurons in the output layer is .
[0023] Step 3.3: Run the neural network model and fit the sampled values and actual measured values The input is the actual measured value of the electric energy meter. , the output is the predicted value of the electric energy meter sampling value ,in, The neural network model predicts the energy meter The neural network model is calculated using formula (5). The predicted sample value and The residual of the actual sample value as follows: (5) So we get the residual vector .
[0024] Step 4: Determine the inaccuracy threshold of the electric energy meter using the K-means clustering method; Step 4.1: Initialization The initial cluster centers are as follows: (6) The coordinates of each initial cluster center are as follows: (7) in, Indicates Cluster centers, Indicates The coordinates of the cluster centers, The value of is 1,2…k; Step 4.2: Determine each residual arrive The Euclidean distance between cluster centers , and assign the data point to the cluster to which the nearest cluster center belongs; each residual arrive The Euclidean distance between cluster centers The calculation formula is as follows: (8) Step 4.3: Get the optimal solution through iteration. The coordinates of the cluster centers are as follows: (9) Step 4.4: Determine the inaccuracy threshold control limit of the electric energy meter as follows: (10) in, is the inaccuracy threshold control limit of the electric energy meter.
[0025] Step 5: The measured value of the electric energy meter to be diagnosed is subjected to a denoising encoder model to obtain denoised measured value data, the neural network model is combined with the electric energy meter inaccuracy threshold control limit to obtain an electric energy meter inaccuracy diagnosis model, and the measured value of the electric energy meter to be diagnosed is input into the electric energy meter inaccuracy diagnosis model to obtain the electric energy meter inaccuracy probability; The calculation formula of the electric energy meter inaccuracy probability is as follows: (11) in, is the total length of the test data, The test data exceeds the electric energy meter inaccuracy threshold control limit The data length.
[0026] like Figure 3As shown, the length of the first block of electric energy meter data to be diagnosed is 1000, of which the normal data length is 900, which exceeds the electric energy meter inaccuracy threshold control limit The total data length is 100, then the probability of the electric energy meter being inaccurate is 100 / 1000*100%=10%.
[0027] like Figure 4 As shown, the second block of electric energy meter data to be diagnosed has a length of 1200, of which the normal data length is 1050, which exceeds the electric energy meter inaccuracy threshold control limit The total data length is 150, so the probability of inaccuracy of the electric energy meter is 150 / 1200*100%=12.5%.
[0028] An electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the electric energy meter misalignment diagnosis method in embodiment 1, and the processor is configured to execute the program stored in the memory.
[0029] A storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the electric energy meter misalignment diagnosis method in embodiment 1 are executed.
[0030] 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. However, these 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.
Claims
1. A method for diagnosing inaccuracy of an electric energy meter, characterized in that: The following steps are involved: Step 1: Obtain the sampling value and actual measurement value of the normally operating electric energy meter as sample data; Step 2: training a denoising encoder model for denoising the power meter misalignment diagnosis data; Step 3: construct a neural network model to fit the relationship between the electric energy meter sampling value and the measured value and calculate the residual; Step 4: Determine the inaccuracy threshold of the electric energy meter using the K-means clustering method; Step 5: The measured value of the electric energy meter to be diagnosed is subjected to a denoising encoder model to obtain denoised measured value data, the neural network model is combined with the electric energy meter inaccuracy threshold control limit to obtain an electric energy meter inaccuracy diagnosis model, and the measured value of the electric energy meter to be diagnosed is input into the electric energy meter inaccuracy diagnosis model to obtain the electric energy meter inaccuracy probability.
2. The method for diagnosing misalignment of an electric energy meter according to claim 1, characterized in that: The sampling value and actual measurement value of the normal running electric energy meter described in step 1 are respectively recorded as and ; Indicates the energy meter Sample values, Indicates the energy meter The actual measured value, The value of is 1,2…n, Indicates the data length.
3. The method for diagnosing misalignment of an electric energy meter according to claim 2, characterized in that: The method for training the denoising encoder model in step 2 for denoising the electric energy meter misalignment diagnosis data is as follows: Step 2.1: Generate noisy data; obtain the actual measured value Adding Noise , get the actual measurement value containing noise ; Step 2.2: Reduce the dimension of the actual measurement value containing noise according to formula (1) to obtain a low-dimensional vector as follows: (1) in, represents the weight of the encoder, Indicates the encoder offset, is the activation function; Step 2.3, reconstruct the output data from the low-dimensional vector according to formula (2), and train the denoising encoder model, and update the parameters of the model by minimizing the loss function. The loss function is shown in formula (3): (2) (3) in, represents the weight of the decoder, Represents the bias of the decoder.
4. The method for diagnosing misalignment of an electric energy meter according to claim 3, characterized in that: The method of constructing a neural network model to fit the relationship between the electric energy meter sampling value and the measured value and calculating the residual in step 3 is as follows: Step 3.1: Get the sample value of the electric energy meter and actual measured values Normalize and get the normalized sampling value data vector and the actual measured value vector ; The normalized formula is as follows: (4) in, Indicates the sampling value of the energy meter and the actual measured value The values, and Respectively represent the sampling values of the electric energy meter and the actual measured value The maximum and minimum values in Indicates the value after normalization of data; Step 3.2: Construct a neural network model. The structure of the neural network model is one input layer, and the number of neurons in the input layer is , 2 hidden layers, the number of neurons in the first hidden layer is 64, and the RELU function is used as the activation function. The number of neurons in the second hidden layer is 32, and the RELU function is used as the activation function. There is 1 output layer, and the number of neurons in the output layer is ; Step 3.3: Run the neural network model and fit the sampled values and actual measured values The input is the actual measured value of the electric energy meter. , the output is the predicted value of the electric energy meter sampling value ,in, The energy meter predicted by the neural network model The neural network model is calculated by using formula (5). The predicted sample value and The residual of the actual sample value as follows: (5) So we get the residual vector .
5. The method for diagnosing misalignment of an electric energy meter according to claim 4, characterized in that: The method for determining the inaccuracy threshold of the electric energy meter using the K-means clustering method described in step 4 is specifically as follows: Step 4.1: Initialization The initial cluster centers are as follows: (6) The coordinates of each initial cluster center are as follows: (7) in, Indicates Cluster centers, Indicates The coordinates of the cluster centers, The value of is 1,2…k; Step 4.2: Determine each residual arrive The Euclidean distance between cluster centers , and assign the data point to the cluster to which the nearest cluster center belongs; each residual arrive The Euclidean distance between cluster centers The calculation formula is as follows: (8) Step 4.3: Get the optimal solution through iteration. The coordinates of the cluster centers are as follows: (9) Step 4.4: Determine the inaccuracy threshold control limit of the electric energy meter as follows: (10) in, is the inaccuracy threshold control limit of the electric energy meter.
6. The method for diagnosing misalignment of an electric energy meter according to claim 5, characterized in that: The calculation formula of the inaccuracy probability of the electric energy meter in step 5 is as follows: (11) in, is the total length of the test data, The test data exceeds the electric energy meter inaccuracy threshold control limit The data length.
7. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the electric energy meter misalignment diagnosis method according to any one of claims 1 to 6, and the processor is configured to execute the program stored in the memory.
8. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for diagnosing misalignment of an electric energy meter according to any one of claims 1 to 6 are executed.
Citation Information
Cited By
Electric energy meter misalignment online diagnosis method based on lightweight neural network
CN119089314A
An online diagnosis method for electric energy meter inaccuracy based on lightweight neural network
CN119089314B
Electric energy meter fault detection method and system
CN120928275A
