CN117688301A - Power metering fault identification method and equipment based on deep learning - Google Patents

Power metering fault identification method and equipment based on deep learning Download PDF

Info

Publication number
CN117688301A
CN117688301A CN202311621810.4A CN202311621810A CN117688301A CN 117688301 A CN117688301 A CN 117688301A CN 202311621810 A CN202311621810 A CN 202311621810A CN 117688301 A CN117688301 A CN 117688301A
Authority
CN
China
Prior art keywords
power metering
electric power
sample data
fault identification
network model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311621810.4A
Other languages
Chinese (zh)
Inventor
李灿辉
阙兴榕
江一鹤
李春利
吴宝林
赖素娟
王雪莲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Fujian Electric Power Co Ltd
Longyan Power Supply Co of State Grid Fujian Electric Power Co Ltd
Original Assignee
State Grid Fujian Electric Power Co Ltd
Longyan Power Supply Co of State Grid Fujian Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Fujian Electric Power Co Ltd, Longyan Power Supply Co of State Grid Fujian Electric Power Co Ltd filed Critical State Grid Fujian Electric Power Co Ltd
Priority to CN202311621810.4A priority Critical patent/CN117688301A/en
Publication of CN117688301A publication Critical patent/CN117688301A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/10Pre-processing; Data cleansing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • G06N3/0442Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/047Probabilistic or stochastic networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/09Supervised learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Molecular Biology (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Supply And Distribution Of Alternating Current (AREA)

Abstract

The invention discloses a power metering fault identification method based on deep learning, which comprises the following steps: constructing an initial power metering data set; carrying out data classification on the initial electric power metering data set by adopting a K-Medoids algorithm, and dividing a training set and a testing set; constructing and training a power metering fault identification network model; inputting the electric power metering sample data of the test set into an electric power metering fault identification network model test, and repeating the training test until the accuracy reaches a set threshold value to obtain a final electric power metering fault identification network model; and inputting the electric power metering data to be detected into a final electric power metering fault identification network model to obtain a category result output by the electric power metering fault identification network model. Correspondingly, the invention further provides electric power metering fault identification equipment based on deep learning. According to the invention, the electric power metering data is automatically detected and identified by combining the K-Medoids algorithm with the CNN-LSTM-based electric power metering fault identification network model, so that the electric power metering fault identification efficiency is improved.

Description

Power metering fault identification method and equipment based on deep learning
Technical Field
The invention belongs to the technical field of fault identification, and particularly relates to a power metering fault identification method and equipment based on deep learning.
Background
Along with the development of the power grid technology, the power enterprises are provided with corresponding metering automation systems, the metering automation systems automatically count electric energy metering data of corresponding areas through metering equipment such as a distribution transformer monitoring terminal, a load management terminal and the like, but the monitoring of the electric energy metering data is generally achieved by adopting a manual monitoring detection mode, the automation degree is low, real-time monitoring cannot be achieved, and if electric power metering faults occur in a period, the electric energy metering faults cannot be found and processed in time. Therefore, there is a need for a power metering fault recognition method based on deep learning, which combines a K-Medoids algorithm with a CNN-LSTM-based power metering fault recognition network model to automatically detect and recognize power metering data, thereby improving power metering fault recognition efficiency.
Chinese patent publication No. CN112948205a discloses a novel electric power metering and monitoring system. The system mainly comprises a monitoring terminal, a gateway and power metering equipment, wherein the monitoring terminal is connected with the power metering equipment through the gateway, and the monitoring terminal comprises a cloud information acquisition module, a power metering equipment information acquisition module and an equipment state prediction module. The novel electric power metering monitoring system adds the function of equipment fault prediction on the basis of the traditional electric power metering monitoring system, so that the monitoring system not only feeds back data simply, but also performs prediction judgment according to the acquired data, and the application range of the circuit metering monitoring system is expanded. The invention only provides the prediction of the state of the power metering equipment according to the neural network, the fault of the power metering is not pointed and clear, and the type of the fault of the power metering is difficult to confirm.
Disclosure of Invention
The invention provides a power metering fault identification method and equipment based on deep learning, and aims to solve the problem that the prior art lacks of automatic detection and identification of power metering data by combining a K-Medoids algorithm and a CNN-LSTM-based power metering fault identification network model and improves power metering fault identification efficiency.
In order to solve the technical problems, the invention provides a power metering fault identification method based on deep learning, which comprises the following steps:
s1: collecting historical electric power metering sample data, preprocessing the historical electric power metering sample data to form an initial electric power metering data set, and specifically:
s11: the collected historical power metering sample data comprises three-phase voltage, three-phase current, total power factor, three-phase average power, total power and reporting capacity.
S12: the preprocessing of the historical power metering sample data specifically comprises the steps of removing repeated sample data, filtering sample data with abnormal values and missing values and normalizing.
S2: and carrying out data classification on the initial electric power metering data set by adopting a K-Medoids algorithm, marking each classified electric power metering sample data according to a classification result, and dividing a training set and a testing set.
S3: and constructing a CNN-LSTM-based power metering fault recognition network model, inputting power metering sample data of a training set into the power metering fault recognition network model for training, and obtaining the trained power metering fault recognition network model.
S4: and (3) inputting the electric power metering sample data of the test set into the electric power metering fault identification network model for testing, repeating the steps S3 and S4, and counting the correct rate of the class result output by the model until the correct rate reaches a set threshold value, thereby obtaining the final electric power metering fault identification network model.
S5: and inputting the electric power metering data to be detected into a final electric power metering fault identification network model, and determining whether the electric power metering data to be detected generate faults and fault types thereof according to the class results output by the electric power metering fault identification network model.
Preferably, the step S2 specifically includes:
s21: for an initial power metering dataset of total N, k=6 sample data are chosen as the central point.
S22: according to the principle of the distance from the center point to the nearest center point, the rest N-K sample data are divided into the class where the current optimal center point is located.
S23: and sequentially calculating the function values of criterion functions when other sample data except the center point in each class are taken as new center points, traversing all sample data, finding the sample data corresponding to the minimum value of the criterion functions, taking the sample data as the new center points, wherein the calculation format of the criterion functions is as follows:
wherein F is a criterion function, K is the total number of categories, i.e. [1, K],C i For class i power metering data, p is C i Sample data except for the center point, o i Is C i Center point of class.
S24: and repeating the steps S22 and S23 until all the central points are not changed any more or the set maximum iteration times are reached, outputting a classification result of the obtained electric power metering data set, marking each classified electric power metering sample data according to the classification result, and dividing a training set and a testing set.
Preferably, in the step S3, the construction of the CNN-LSTM-based power metering fault identification network model structure is specifically implemented by sequentially connecting a first convolution layer, a second convolution layer, a first maximum pooling layer, a third convolution layer, a fourth convolution layer, a second maximum pooling layer, an LSTM layer and a full connection layer; the first convolution layer has a convolution kernel size of 5*5, a convolution kernel number of 16, a step size of 1*1, the second convolution layer has a convolution kernel size of 5*5, a convolution kernel number of 32, a step size of 1*1, the third convolution layer has a convolution kernel size of 3*3, a convolution kernel number of 64, a step size of 1*1, the fourth convolution layer has a convolution kernel size of 3*3, a convolution kernel number of 128, and a step size of 1*1, all of the convolution layers using a Relu activation function; the pooling windows of the first maximum pooling layer and the second pooling layer are set to be 2 x 2; the number of neurons of the LSTM layer is set to 128; the fully connected layer uses a Softmax activation function to output six categories of probabilities of voltage imbalance, current imbalance, wiring errors, power factor anomalies, overload and no faults.
Preferably, the loss function of the electric power metering fault identification network model adopts a root mean square error loss function, and the calculation formula of the root mean square error loss function specifically comprises:
where RMSE is the root mean square error loss function, N is the total number of sample data,to predict the output value, y i Is the true value of the sample data.
Preferably, the electric power metering fault recognition network model adopts an Adam optimization algorithm to accelerate convergence, and the learning rate of the Adam algorithm is set to be 0.001.
Accordingly, the invention also proposes a deep learning based power metering fault identification device comprising a processor and a memory, said memory storing instructions adapted to be loaded by the processor and to perform the following steps:
s1: collecting historical electric power metering sample data, preprocessing the historical electric power metering sample data to form an initial electric power metering data set, and specifically:
s11: the collected historical power metering sample data comprises three-phase voltage, three-phase current, total power factor, three-phase average power, total power and reporting capacity.
S12: the preprocessing of the historical power metering sample data specifically comprises the steps of removing repeated sample data, filtering sample data with abnormal values and missing values and normalizing.
S2: and carrying out data classification on the initial electric power metering data set by adopting a K-Medoids algorithm, marking each classified electric power metering sample data according to a classification result, and dividing a training set and a testing set.
S3: and constructing a CNN-LSTM-based power metering fault recognition network model, inputting power metering sample data of a training set into the power metering fault recognition network model for training, and obtaining the trained power metering fault recognition network model.
S4: and (3) inputting the electric power metering sample data of the test set into the electric power metering fault identification network model for testing, repeating the steps S3 and S4, and counting the correct rate of the class result output by the model until the correct rate reaches a set threshold value, thereby obtaining the final electric power metering fault identification network model.
S5: and inputting the electric power metering data to be detected into a final electric power metering fault identification network model, and determining whether the electric power metering data to be detected generate faults and fault types thereof according to the class results output by the electric power metering fault identification network model.
Preferably, the step S2 specifically includes:
s21: for an initial power metering dataset of total N, k=6 sample data are chosen as the central point.
S22: according to the principle of the distance from the center point to the nearest center point, the rest N-K sample data are divided into the class where the current optimal center point is located.
S23: and sequentially calculating the function values of criterion functions when other sample data except the center point in each class are taken as new center points, traversing all sample data, finding the sample data corresponding to the minimum value of the criterion functions, taking the sample data as the new center points, wherein the calculation format of the criterion functions is as follows:
wherein F is a criterion function, K is the total number of categories, i.e. [1, K],C i For class i power metering data, p is C i Sample data except for the center point, o i Is C i Center point of class.
S24: and repeating the steps S22 and S23 until all the central points are not changed any more or the set maximum iteration times are reached, outputting a classification result of the obtained electric power metering data set, marking each classified electric power metering sample data according to the classification result, and dividing a training set and a testing set.
Preferably, in the step S3, the construction of the CNN-LSTM-based power metering fault identification network model structure is specifically implemented by sequentially connecting a first convolution layer, a second convolution layer, a first maximum pooling layer, a third convolution layer, a fourth convolution layer, a second maximum pooling layer, an LSTM layer and a full connection layer; the first convolution layer has a convolution kernel size of 5*5, a convolution kernel number of 16, a step size of 1*1, the second convolution layer has a convolution kernel size of 5*5, a convolution kernel number of 32, a step size of 1*1, the third convolution layer has a convolution kernel size of 3*3, a convolution kernel number of 64, a step size of 1*1, the fourth convolution layer has a convolution kernel size of 3*3, a convolution kernel number of 128, and a step size of 1*1, all of the convolution layers using a Relu activation function; the pooling windows of the first maximum pooling layer and the second pooling layer are set to be 2 x 2; the number of neurons of the LSTM layer is set to 128; the fully connected layer uses a Softmax activation function to output six categories of probabilities of voltage imbalance, current imbalance, wiring errors, power factor anomalies, overload and no faults.
Preferably, the loss function of the electric power metering fault identification network model adopts a root mean square error loss function, and the calculation formula of the root mean square error loss function specifically comprises:
where RMSE is the root mean square error loss function, N is the total number of sample data,to predict the output value, y i Is the true value of the sample data.
Preferably, the electric power metering fault recognition network model adopts an Adam optimization algorithm to accelerate model convergence, and the learning rate of the Adam algorithm is set to be 0.001.
Compared with the prior art, the invention has the following technical effects:
1. the invention provides a power metering fault identification method based on deep learning, which is characterized in that the power metering data is automatically detected and identified by combining a K-Medoids algorithm and a CNN-LSTM-based power metering fault identification network model, and in the power metering fault identification network model training process, the category clustered by the K-Medoids algorithm can be used as a label to supervise and learn the power metering data. The power metering fault identification network model is trained through a large amount of power metering data, so that the power metering fault identification network model can automatically learn and identify different types of power metering faults. Finally, the trained electric power metering fault recognition network model is utilized to automatically detect and recognize new electric power metering data, so that the automatic recognition and detection of electric power metering faults are realized, the accuracy and efficiency of electric power metering fault recognition are improved, and the method has important significance for safe and stable operation of an electric power metering system.
2. The invention uses the K-Medoids algorithm to cluster the electric power metering data, the algorithm is an improved version of the K-Means algorithm, and the problem that the K-Means algorithm is sensitive to the initial point is avoided by selecting a representative central point as a clustering center. Through clustering the electric power metering data, the electric power metering data can be divided into different categories, and subsequent model training and classification are facilitated.
3. According to the invention, a neural network model based on CNN-LSTM is constructed by using a clustering result, firstly, the space-time characteristics of the data are extracted by using CNN, and the CNN can effectively capture the space and time information in the data. The extracted features are then time-series modeled using LSTM, which can effectively process the features of the time-series data. By combining CNN and LSTM, the space-time characteristics of the data can be fully mined, so that the accuracy of the power metering fault identification network model is improved.
Drawings
FIG. 1 is an overall flow chart of a deep learning-based power metering fault identification method according to the present invention;
fig. 2 is a specific structural diagram of a network model for identifying power metering faults according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the specific embodiments of the present application and with reference to the accompanying drawings.
Example 1
The invention provides a power metering fault identification method based on deep learning, which is shown in a reference picture 1 and comprises the following steps:
s1: collecting historical electric power metering sample data, preprocessing the historical electric power metering sample data to form an initial electric power metering data set, and specifically:
s11: the collected historical power metering sample data comprises three-phase voltage, three-phase current, total power factor, three-phase average power, total power and reporting capacity.
S12: preprocessing the historical electric power metering sample data specifically comprises removing repeated sample data, filtering sample data with abnormal values and missing values and normalizing, wherein the preprocessing specifically comprises the following steps:
and removing repeated sample data, namely removing sample data with consistent data.
Sample data with abnormal values and missing values are filtered, namely, sample data which is far beyond the normal power metering data range or has negative values for the data are removed. Sample data with a small number of missing values can be filled in by a Lagrangian interpolation method, and sample data with a large number of missing values can be removed.
And carrying out normalization processing on the sample data by adopting linear proportion normalization.
S2: the method comprises the steps of carrying out data classification on an initial electric power metering data set by adopting a K-Medoids algorithm, and classifying electric power metering sample data into six categories of voltage unbalance, current unbalance, wiring error, power factor abnormality, overload and no fault, wherein evaluation indexes of each category are respectively as follows: the three-phase voltage unbalance is higher than 5% of the set value, the three-phase current unbalance is higher than 10% of the set value, the ratio of the difference between the three-phase average power and the total power exceeds 10% of the set value, the power factor is lower than the set value, the total power exceeds the reporting capacity and all kinds of evaluation indexes are in a normal range, each classified electric power metering sample data is marked according to the classification result, and the training set and the test set are divided.
S3: and constructing a CNN-LSTM-based power metering fault recognition network model, inputting power metering sample data of a training set into the power metering fault recognition network model for training, and obtaining the trained power metering fault recognition network model.
S4: and (3) inputting the electric power metering sample data of the test set into the electric power metering fault identification network model for testing, repeating the steps S3 and S4, and counting the correct rate of the class result output by the model until the correct rate reaches a set threshold value, thereby obtaining the final electric power metering fault identification network model.
S5: and inputting the electric power metering data to be detected into a final electric power metering fault identification network model, and determining whether the electric power metering data to be detected generate faults and fault types thereof according to the class results output by the electric power metering fault identification network model.
Further, the step S2 specifically includes:
s21: for an initial power metering dataset of total N, k=6 sample data are chosen as the central point.
S22: according to the principle of the distance from the center point to the nearest center point, the rest N-K sample data are divided into the class where the current optimal center point is located.
S23: and sequentially calculating the function values of criterion functions when other sample data except the center point in each class are taken as new center points, traversing all sample data, finding the sample data corresponding to the minimum value of the criterion functions, taking the sample data as the new center points, wherein the calculation format of the criterion functions is as follows:
wherein F is a criterion function, K is the total number of categories, i.e. [1, K],C i For class i power metering data, p is C i Sample data except for the center point, o i Is C i Center point of class.
S24: and repeating the steps S22 and S23 until all the central points are not changed any more or the set maximum iteration times are reached, outputting a classification result of the obtained electric power metering data set, marking each classified electric power metering sample data according to the classification result, and dividing a training set and a testing set.
Further, referring to fig. 2, in the step S3, the construction of the CNN-LSTM-based power metering fault identification network model structure is specifically implemented by sequentially connecting a first convolution layer, a second convolution layer, a first maximum pooling layer, a third convolution layer, a fourth convolution layer, a second maximum pooling layer, an LSTM layer and a full connection layer; the first convolution layer has a convolution kernel size of 5*5, a convolution kernel number of 16, a step size of 1*1, the second convolution layer has a convolution kernel size of 5*5, a convolution kernel number of 32, a step size of 1*1, the third convolution layer has a convolution kernel size of 3*3, a convolution kernel number of 64, a step size of 1*1, the fourth convolution layer has a convolution kernel size of 3*3, a convolution kernel number of 128, and a step size of 1*1, all of the convolution layers using a Relu activation function; the pooling windows of the first maximum pooling layer and the second pooling layer are set to be 2 x 2; the number of neurons of the LSTM layer is set to 128; the fully connected layer uses a Softmax activation function to output six categories of probabilities of voltage imbalance, current imbalance, wiring errors, power factor anomalies, overload and no faults.
Further, the LSTM layer is composed of an input gate, a forget gate, and an output gate, where the input gate is used to control the inflow of new input data, and the input gate compares the input data with the previous memory state through a sigmoid activation function to determine which new information is to be added into the memory unit. The forgetting gate is used for controlling the forgetting amount of the previous memory state, and the forgetting gate also compares the previous memory state with the input data through a sigmoid activation function to determine which information is to be forgotten. The output gate is used for extracting information and outputting the information to the next layer of the model, and the output gate controls the outflow of the information through a sigmoid activation function and multiplication operation.
Further, to prevent the trained power metering fault identification network model from being over fitted, a Dropout layer may be provided after the LSTM layer and before the fully connected layer, where the Dropout ratio of the Dropout layer is set to 0.2.
Further, the calculation formula of the Softmax activation function is specifically:
wherein f (x) i ) Activate function for Softmax, x i And (3) the ith output of the full-connection layer of the power metering fault identification network model is obtained, N is the number of full-connection layer identification results, and N=6.
Further, the loss function of the electric power metering fault identification network model adopts a root mean square error loss function, and the calculation formula of the root mean square error loss function specifically comprises:
where RMSE is the root mean square error loss function, N is the total number of sample data,to predict the output value, y i Is the true value of the sample data.
Furthermore, the electric power metering fault recognition network model adopts an Adam optimization algorithm to optimize and accelerate model convergence, and the Adam algorithm is an algorithm based on gradient descent, so that self-adaptive learning rate can be realized, and the model can be trained faster and better. The learning rate of Adam algorithm was set to 0.001.
Example two
Correspondingly, the invention also provides a power metering fault identification device based on deep learning, which comprises a processor and a memory, wherein the memory stores instructions, and the instructions are suitable for being loaded by the processor and execute the following steps of:
s1: collecting historical electric power metering sample data, preprocessing the historical electric power metering sample data to form an initial electric power metering data set, and specifically:
s11: the collected historical power metering sample data comprises three-phase voltage, three-phase current, total power factor, three-phase average power, total power and reporting capacity.
S12: preprocessing the historical electric power metering sample data specifically comprises removing repeated sample data, filtering sample data with abnormal values and missing values and normalizing, wherein the preprocessing specifically comprises the following steps:
and removing repeated sample data, namely removing sample data with consistent data.
Sample data with abnormal values and missing values are filtered, namely, sample data which is far beyond the normal power metering data range or has negative values for the data are removed. Sample data with a small number of missing values can be filled in by a Lagrangian interpolation method, and sample data with a large number of missing values can be removed.
And carrying out normalization processing on the sample data by adopting linear proportion normalization.
S2: the method comprises the steps of carrying out data classification on an initial electric power metering data set by adopting a K-Medoids algorithm, and classifying electric power metering sample data into six categories of voltage unbalance, current unbalance, wiring error, power factor abnormality, overload and no fault, wherein evaluation indexes of each category are respectively as follows: the three-phase voltage unbalance is higher than 5% of the set value, the three-phase current unbalance is higher than 10% of the set value, the ratio of the difference between the three-phase average power and the total power exceeds 10% of the set value, the power factor is lower than the set value, the total power exceeds the reporting capacity and all kinds of evaluation indexes are in a normal range, each classified electric power metering sample data is marked according to the classification result, and the training set and the test set are divided.
S3: and constructing a CNN-LSTM-based power metering fault recognition network model, inputting power metering sample data of a training set into the power metering fault recognition network model for training, and obtaining the trained power metering fault recognition network model.
S4: and (3) inputting the electric power metering sample data of the test set into the electric power metering fault identification network model for testing, repeating the steps S3 and S4, and counting the correct rate of the class result output by the model until the correct rate reaches a set threshold value, thereby obtaining the final electric power metering fault identification network model.
S5: and inputting the electric power metering data to be detected into a final electric power metering fault identification network model, and determining whether the electric power metering data to be detected generate faults and fault types thereof according to the class results output by the electric power metering fault identification network model.
Further, the step S2 specifically includes:
s21: for an initial power metering dataset of total N, k=6 sample data are chosen as the central point.
S22: according to the principle of the distance from the center point to the nearest center point, the rest N-K sample data are divided into the class where the current optimal center point is located.
S23: and sequentially calculating the function values of criterion functions when other sample data except the center point in each class are taken as new center points, traversing all sample data, finding the sample data corresponding to the minimum value of the criterion functions, taking the sample data as the new center points, wherein the calculation format of the criterion functions is as follows:
wherein F is a criterion function, K is the total number of categories, i.e. [1, K],C i For class i power metering data, p is C i Sample data except for the center point, o i Is C i Center point of class.
S24: and repeating the steps S22 and S23 until all the central points are not changed any more or the set maximum iteration times are reached, outputting a classification result of the obtained electric power metering data set, marking each classified electric power metering sample data according to the classification result, and dividing a training set and a testing set.
Further, referring to fig. 2, in the step S3, the construction of the CNN-LSTM-based power metering fault identification network model structure is specifically implemented by sequentially connecting a first convolution layer, a second convolution layer, a first maximum pooling layer, a third convolution layer, a fourth convolution layer, a second maximum pooling layer, an LSTM layer and a full connection layer; the first convolution layer has a convolution kernel size of 5*5, a convolution kernel number of 16, a step size of 1*1, the second convolution layer has a convolution kernel size of 5*5, a convolution kernel number of 32, a step size of 1*1, the third convolution layer has a convolution kernel size of 3*3, a convolution kernel number of 64, a step size of 1*1, the fourth convolution layer has a convolution kernel size of 3*3, a convolution kernel number of 128, and a step size of 1*1, all of the convolution layers using a Relu activation function; the pooling windows of the first maximum pooling layer and the second pooling layer are set to be 2 x 2; the number of neurons of the LSTM layer is set to 128; the fully connected layer uses a Softmax activation function to output six categories of probabilities of voltage imbalance, current imbalance, wiring errors, power factor anomalies, overload and no faults.
Further, the LSTM layer is composed of an input gate, a forget gate, and an output gate, where the input gate is used to control the inflow of new input data, and the input gate compares the input data with the previous memory state through a sigmoid activation function to determine which new information is to be added into the memory unit. The forgetting gate is used for controlling the forgetting amount of the previous memory state, and the forgetting gate also compares the previous memory state with the input data through a sigmoid activation function to determine which information is to be forgotten. The output gate is used for extracting information and outputting the information to the next layer of the model, and the output gate controls the outflow of the information through a sigmoid activation function and multiplication operation.
Further, to prevent the trained power metering fault identification network model from being over fitted, a Dropout layer may be provided after the LSTM layer and before the fully connected layer, where the Dropout ratio of the Dropout layer is set to 0.2.
Further, the calculation formula of the Softmax activation function is specifically:
wherein f (x) i ) Activate function for Softmax, x i And (3) the ith output of the full-connection layer of the power metering fault identification network model is obtained, N is the number of full-connection layer identification results, and N=6.
Further, the loss function of the electric power metering fault identification network model adopts a root mean square error loss function, and the calculation formula of the root mean square error loss function specifically comprises:
where RMSE is the root mean square error loss function, N is the total number of sample data,to predict the output value, y i Is the true value of the sample data.
Furthermore, the electric power metering fault recognition network model adopts an Adam optimization algorithm to accelerate model convergence, and the Adam algorithm is an algorithm based on gradient descent, so that self-adaptive learning rate can be realized, and the model can be trained faster and better. The learning rate of Adam algorithm was set to 0.001.
The foregoing is merely a preferred embodiment of the present invention, and it should be noted that modifications and improvements could be made by those skilled in the art without departing from the inventive concept, which falls within the scope of the present invention.

Claims (10)

1. The electric power metering fault identification method based on deep learning is characterized by comprising the following steps of:
s1: collecting historical electric power metering sample data, preprocessing the historical electric power metering sample data to form an initial electric power metering data set, and specifically:
s11: the collected historical electric power metering sample data comprises three-phase voltage, three-phase current, total power factor, three-phase average power, total power and report capacity;
s12: preprocessing the historical electric power metering sample data specifically comprises the steps of removing repeated sample data, filtering sample data with abnormal values and missing values and normalizing;
s2: carrying out data classification on the initial electric power metering data set by adopting a K-Medoids algorithm, marking each classified electric power metering sample data according to a classification result, and dividing a training set and a testing set;
s3: constructing a CNN-LSTM-based power metering fault identification network model, inputting power metering sample data of a training set into the power metering fault identification network model for training, and obtaining a trained power metering fault identification network model;
s4: inputting the electric power metering sample data of the test set into an electric power metering fault identification network model for testing, repeating the steps S3 and S4, and counting the correct rate of the class result output by the model until the correct rate reaches a set threshold value, so as to obtain a final electric power metering fault identification network model;
s5: and inputting the electric power metering data to be detected into a final electric power metering fault identification network model, and determining whether the electric power metering data to be detected generate faults and fault types thereof according to the class results output by the electric power metering fault identification network model.
2. The method for identifying power metering faults based on deep learning according to claim 1, wherein the step S2 is specifically:
s21: selecting k=6 sample data as a central point for an initial power metering data set with total number of N;
s22: according to the principle of the distance nearest to the center point, the rest N-K sample data are divided into the class where the current optimal center point is located;
s23: and sequentially calculating the function values of criterion functions when other sample data except the center point in each class are taken as new center points, traversing all sample data, finding the sample data corresponding to the minimum value of the criterion functions, taking the sample data as the new center points, wherein the calculation format of the criterion functions is as follows:
wherein F is a criterion function, K is the total number of categories, i∈[1,K],C i For class i power metering data, p is C i Sample data except for the center point, o i Is C i A center point of the class;
s24: and repeating the steps S22 and S23 until all the central points are not changed any more or the set maximum iteration times are reached, outputting a classification result of the obtained electric power metering data set, marking each classified electric power metering sample data according to the classification result, and dividing a training set and a testing set.
3. The deep learning-based power metering fault identification method according to claim 1, wherein the construction of the CNN-LSTM-based power metering fault identification network model structure in the step S3 is specifically that a first convolution layer, a second convolution layer, a first maximum pooling layer, a third convolution layer, a fourth convolution layer, a second maximum pooling layer, an LSTM layer and a fully connected layer are sequentially connected; the first convolution layer has a convolution kernel size of 5*5, a convolution kernel number of 16, a step size of 1*1, the second convolution layer has a convolution kernel size of 5*5, a convolution kernel number of 32, a step size of 1*1, the third convolution layer has a convolution kernel size of 3*3, a convolution kernel number of 64, a step size of 1*1, the fourth convolution layer has a convolution kernel size of 3*3, a convolution kernel number of 128, and a step size of 1*1, all of the convolution layers using a Relu activation function; the pooling windows of the first maximum pooling layer and the second pooling layer are set to be 2 x 2; the number of neurons of the LSTM layer is set to 128; the fully connected layer uses a Softmax activation function to output six categories of probabilities of voltage imbalance, current imbalance, wiring errors, power factor anomalies, overload and no faults.
4. The method for identifying power metering faults based on deep learning according to claim 3, wherein a loss function of the power metering fault identification network model adopts a root mean square error loss function, and a calculation formula of the root mean square error loss function specifically comprises:
where RMSE is the root mean square error loss function, N is the total number of sample data,to predict the output value, y i Is the true value of the sample data.
5. The method for identifying the power metering fault based on deep learning according to claim 3, wherein the power metering fault identification network model adopts an Adam optimization algorithm to accelerate model convergence, and the learning rate of the Adam algorithm is set to be 0.001.
6. A deep learning based power metering fault identification device, the device comprising a processor and a memory, the memory storing instructions adapted to be loaded by the processor and to perform the steps of:
s1: collecting historical electric power metering sample data, preprocessing the historical electric power metering sample data to form an initial electric power metering data set, and specifically:
s11: the collected historical electric power metering sample data comprises three-phase voltage, three-phase current, total power factor, three-phase average power, total power and report capacity;
s12: preprocessing the historical electric power metering sample data specifically comprises the steps of removing repeated sample data, filtering sample data with abnormal values and missing values and normalizing;
s2: carrying out data classification on the initial electric power metering data set by adopting a K-Medoids algorithm, marking each classified electric power metering sample data according to a classification result, and dividing a training set and a testing set;
s3: constructing a CNN-LSTM-based power metering fault identification network model, inputting power metering sample data of a training set into the power metering fault identification network model for training, and obtaining a trained power metering fault identification network model;
s4: inputting the electric power metering sample data of the test set into an electric power metering fault identification network model for testing, repeating the steps S3 and S4, and counting the correct rate of the class result output by the model until the correct rate reaches a set threshold value, so as to obtain a final electric power metering fault identification network model;
s5: and inputting the electric power metering data to be detected into a final electric power metering fault identification network model, and determining whether the electric power metering data to be detected generate faults and fault types thereof according to the class results output by the electric power metering fault identification network model.
7. The deep learning-based power metering fault identifying device according to claim 6, wherein the step S2 is specifically:
s21: selecting k=6 sample data as a central point for an initial power metering data set with total number of N;
s22: according to the principle of the distance nearest to the center point, the rest N-K sample data are divided into the class where the current optimal center point is located;
s23: and sequentially calculating the function values of criterion functions when other sample data except the center point in each class are taken as new center points, traversing all sample data, finding the sample data corresponding to the minimum value of the criterion functions, taking the sample data as the new center points, wherein the calculation format of the criterion functions is as follows:
wherein F is a criterion function, K is the total number of categories, i.e. [1, K],C i For class i power metering data, p is C i Sample data except for the center point, o i Is C i A center point of the class;
s24: and repeating the steps S22 and S23 until all the central points are not changed any more or the set maximum iteration times are reached, outputting a classification result of the obtained electric power metering data set, marking each classified electric power metering sample data according to the classification result, and dividing a training set and a testing set.
8. The deep learning-based power metering fault identification device according to claim 6, wherein the construction of the CNN-LSTM-based power metering fault identification network model structure in the step S3 is specifically that a first convolution layer, a second convolution layer, a first maximum pooling layer, a third convolution layer, a fourth convolution layer, a second maximum pooling layer, an LSTM layer and a fully connected layer are sequentially connected; the first convolution layer has a convolution kernel size of 5*5, a convolution kernel number of 16, a step size of 1*1, the second convolution layer has a convolution kernel size of 5*5, a convolution kernel number of 32, a step size of 1*1, the third convolution layer has a convolution kernel size of 3*3, a convolution kernel number of 64, a step size of 1*1, the fourth convolution layer has a convolution kernel size of 3*3, a convolution kernel number of 128, and a step size of 1*1, all of the convolution layers using a Relu activation function; the pooling windows of the first maximum pooling layer and the second pooling layer are set to be 2 x 2; the number of neurons of the LSTM layer is set to 128; the fully connected layer uses a Softmax activation function to output six categories of probabilities of voltage imbalance, current imbalance, wiring errors, power factor anomalies, overload and no faults.
9. The deep learning-based power metering fault identification device according to claim 8, wherein the loss function of the power metering fault identification network model adopts a root mean square error loss function, and a calculation formula of the root mean square error loss function is specifically as follows:
where RMSE is the root mean square error loss function, N is the total number of sample data,to predict the output value, y i Is the true value of the sample data.
10. The deep learning-based power metering fault identification device according to claim 8, wherein the power metering fault identification network model adopts an Adam optimization algorithm to accelerate model convergence, and the learning rate of the Adam algorithm is set to be 0.001.
CN202311621810.4A 2023-11-28 2023-11-28 Power metering fault identification method and equipment based on deep learning Pending CN117688301A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311621810.4A CN117688301A (en) 2023-11-28 2023-11-28 Power metering fault identification method and equipment based on deep learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311621810.4A CN117688301A (en) 2023-11-28 2023-11-28 Power metering fault identification method and equipment based on deep learning

Publications (1)

Publication Number Publication Date
CN117688301A true CN117688301A (en) 2024-03-12

Family

ID=90134474

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311621810.4A Pending CN117688301A (en) 2023-11-28 2023-11-28 Power metering fault identification method and equipment based on deep learning

Country Status (1)

Country Link
CN (1) CN117688301A (en)

Similar Documents

Publication Publication Date Title
CN103245881B (en) Power distribution network fault analyzing method and device based on tidal current distribution characteristics
CN108761377A (en) A kind of electric energy metering device method for detecting abnormality based on long memory models in short-term
CN113762329A (en) Method and system for constructing state prediction model of large rolling mill
CN110829417A (en) Electric power system transient stability prediction method based on LSTM double-structure model
CN109409444B (en) Multivariate power grid fault type discrimination method based on prior probability
CN111738348B (en) Power data anomaly detection method and device
CN114723285A (en) Power grid equipment safety evaluation prediction method
CN118051827A (en) Power grid fault prediction method based on deep learning
CN114118225A (en) Method, system, electronic device and storage medium for predicting remaining life of generator
CN113866455A (en) Bridge acceleration monitoring data anomaly detection method, system and device based on deep learning
CN113743537A (en) Deep sparse memory model-based highway electromechanical system fault classification method
CN112904148A (en) Intelligent cable operation monitoring system, method and device
CN115481726A (en) Industrial robot complete machine health assessment method and system
CN116400168A (en) Power grid fault diagnosis method and system based on depth feature clustering
CN117589233A (en) Intelligent detection method and system for running state of relay protection device
CN116467648A (en) Early monitoring method for nonlinear platform power failure based on Internet of things table
CN111190072A (en) Centralized meter reading system diagnosis model establishing method, fault diagnosis method and fault diagnosis device
CN114252716A (en) Power grid fault diagnosis method and device and storage medium
CN117933531A (en) Distributed photovoltaic power generation power prediction system and method
CN117060353A (en) Fault diagnosis method and system for high-voltage direct-current transmission system based on feedforward neural network
CN116720095A (en) Electrical characteristic signal clustering method for optimizing fuzzy C-means based on genetic algorithm
CN117688301A (en) Power metering fault identification method and equipment based on deep learning
CN114137915B (en) Fault diagnosis method for industrial equipment
CN112991093B (en) Electric larceny detection method and system based on edge calculation
CN114818849A (en) Convolution neural network based on big data information and anti-electricity-stealing method based on genetic algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination