CN113379116A - Cluster and convolutional neural network-based line loss prediction method for transformer area - Google Patents

Cluster and convolutional neural network-based line loss prediction method for transformer area Download PDF

Info

Publication number
CN113379116A
CN113379116A CN202110626923.8A CN202110626923A CN113379116A CN 113379116 A CN113379116 A CN 113379116A CN 202110626923 A CN202110626923 A CN 202110626923A CN 113379116 A CN113379116 A CN 113379116A
Authority
CN
China
Prior art keywords
neural network
data
line loss
value
convolutional neural
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.)
Withdrawn
Application number
CN202110626923.8A
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.)
Nanjing University of Science and Technology
Original Assignee
Nanjing University of Science and Technology
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 Nanjing University of Science and Technology filed Critical Nanjing University of Science and Technology
Priority to CN202110626923.8A priority Critical patent/CN113379116A/en
Publication of CN113379116A publication Critical patent/CN113379116A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • 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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • 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/08Learning methods
    • 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
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Economics (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Primary Health Care (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Probability & Statistics with Applications (AREA)
  • Public Health (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Water Supply & Treatment (AREA)
  • Development Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method for predicting line loss of a distribution room based on clustering and convolutional neural networks, which comprises the following steps: firstly, establishing a power grid model by adopting PSASP software, and collecting line loss data of a transformer area; secondly, judging and eliminating line loss abnormal constant data by adopting a combined model of a K-means clustering algorithm-LOF local outlier factor detection method; and finally, optimizing the convolutional neural network by adopting a particle swarm algorithm to obtain a PSO-CNN neural network, and performing predictive analysis on the line loss of the transformer area by using the PSO-CNN neural network. The method introduces the convolutional neural network into the prediction application of the line loss of the transformer area, and combines the clustering algorithm, so that the line loss prediction is obviously improved in the aspects of speed and accuracy, and the method has higher practical application value.

Description

Cluster and convolutional neural network-based line loss prediction method for transformer area
Technical Field
The invention relates to the technical field of line loss prediction of a power system, in particular to a platform area line loss prediction method based on clustering and convolutional neural networks.
Background
Line loss is always an important assessment index of power enterprises, and line loss anomaly analysis and accurate line loss prediction have guiding significance for formulation of power grid development planning and implementation of loss reduction measures. The development of line loss prediction research work is beneficial to standardizing the behavior of reading, checking and receiving and the development of electricity stealing prevention work; the enterprise management level is improved, and the economic benefit is improved; and (5) the power grid is standardized, and a conservation-oriented society is built.
However, the power distribution network frame structure is huge, the number of line branches is large, the number of elements is complex and various, the traditional line loss calculation statistical method is large in engineering quantity and low in efficiency, and data loss or errors can occur during traditional power flow calculation, so that the line loss calculation result is inaccurate. With the construction and development of the smart power grid, the power data gradually presents the characteristics of large capacity, diversity and high dimensionality, and the line loss prediction research and the big data technology are combined to well make up the defects of the traditional method.
In the aspect of line loss prediction, a plurality of scholars try to apply a big data technology, and methods based on a traditional neural network, a recurrent neural network, a fuzzy recognition algorithm and the like are continuously improved. However, the shallow learning method has limited ability to process high-dimensional data, poor fitting ability, difficulty in effectively solving the problem of complex nonlinear regression, and limited generalization ability. In addition, the traditional line loss prediction method has the problems of large calculation amount and low efficiency in practical application.
Disclosure of Invention
The invention aims to provide a platform area line loss prediction method based on clustering and convolutional neural networks, which is high in accuracy and can process mass data.
The technical solution for realizing the purpose of the invention is as follows: a method for predicting line loss of a distribution room based on clustering and convolutional neural networks comprises the following steps:
step 1, building a power grid model by adopting PSASP software, and collecting line loss data of a transformer area;
step 2, judging and eliminating line loss abnormal constant data by adopting a combined model of a K-means clustering algorithm-LOF local outlier factor detection method;
and 3, optimizing the convolutional neural network by adopting a particle swarm optimization to obtain a PSO-CNN neural network, and performing predictive analysis on the line loss of the transformer area by using the PSO-CNN neural network.
Compared with the prior art, the invention has the following remarkable advantages: (1) the K-means-LOF algorithm is adopted to judge and eliminate the abnormal line loss data, so that the influence of the abnormal data on model training is eliminated, and the fitting precision of the neural network model is greatly improved; (2) the PSO algorithm is adopted to optimize the convolutional neural network, so that the problems that gradient reduction and even stagnation occur in the process of adjusting the connection weight through error back propagation during the training of the CNN neural network and the convergence speed of the network is influenced are effectively solved; (3) the PSO-CNN neural network is adopted to carry out prediction analysis on the line loss of the transformer area, so that the defects that the traditional line loss prediction method is large in engineering quantity and low in efficiency and the calculation result is inaccurate due to data loss or errors when a large amount of data sets are faced in the operation process of a power grid enterprise can be overcome.
Drawings
Fig. 1 is a flow chart of a platform area line loss prediction method based on clustering and a convolutional neural network.
FIG. 2 is a schematic diagram of a data acquisition simulation model built based on PSASP.
FIG. 3 is a graph of K-means clustering results.
FIG. 4 is a graph showing the comparison between the true value and the predicted value of a sample in a CNN neural network test set.
FIG. 5 is a graph of percentage error for a sample CNN neural network test set.
FIG. 6 is a sample scatter plot of a CNN neural network test set.
FIG. 7 is a graph showing the comparison result between the true value and the predicted value of a sample in a PSO-CNN neural network test set.
FIG. 8 is a graph of sample error percentages for a PSO-CNN neural network test set.
FIG. 9 is a sample scatter plot of a PSO-CNN neural network test set.
Detailed Description
In recent years, deep learning algorithms have attracted attention due to their superior feature learning capabilities. The deep learning algorithm can effectively extract essential characteristics of data and analyze the process of potential value of big data by establishing a multi-level intelligent learning model and massive data training, thereby solving the problem of complex abstraction. The development of a machine learning method based on deep learning provides a new solution for predicting the line loss of the power system.
The invention relates to a method for predicting line loss of a transformer area based on clustering and a convolutional neural network, which aims to solve the problems of large calculation amount and low efficiency of the traditional line loss prediction method in practical application, introduces the convolutional neural network into the application of predicting the line loss of the transformer area, and improves the prediction accuracy by combining a clustering algorithm.
The invention relates to a platform area line loss prediction method based on clustering and convolutional neural networks, which is characterized in that a rural power grid model is built by utilizing a PSASP system to perform data simulation, and the capacity, the active and reactive power supply quantity, the 24h maximum active and reactive power, the line length, the power supply radius and the line loss rate data of a platform area distribution transformer are collected; mining possibly existing line loss abnormal data by adopting a combined model of a K-means clustering algorithm-LOF local outlier factor detection method, firstly clustering scattered data into K classes by using the K-means clustering algorithm, determining an optimal K value by using contour sparsity, respectively calculating data outliers of each class, judging data with overlarge outliers as abnormal data and removing the abnormal data; optimizing a Convolutional Neural Network (CNN) by utilizing a Particle Swarm Optimization (PSO), namely, inputting an optimal solution obtained by the PSO into the CNN as a weight and a threshold in an error back propagation process to solve the problem of error gradient reduction; and (4) performing predictive analysis on the line loss of the transformer area by adopting a PSO-CNN neural network. The method specifically comprises the following steps:
step 1, building a power grid model by adopting PSASP software, and collecting line loss data of a transformer area;
step 2, judging and eliminating line loss abnormal constant data by adopting a combined model of a K-means clustering algorithm-LOF local outlier factor detection method;
and 3, optimizing the convolutional neural network by adopting a particle swarm optimization to obtain a PSO-CNN neural network, and performing predictive analysis on the line loss of the transformer area by using the PSO-CNN neural network.
Further, a power grid model is built by adopting PSASP software in the step 1, and the line loss data of the transformer area are collected, wherein the method specifically comprises the following steps: a simplified low-voltage rural power distribution network is built by adopting PSASP, 10/0.4kV transformers are arranged under 10kV buses, namely 10 transformer areas, wherein 3 transformer areas are provided with 2 main lines led out and connected with residential electricity loads, 4 transformer areas are provided with 3 main lines led out and connected with residential electricity loads, 3 transformer areas are provided with 4 main lines led out and connected with residential electricity loads, and 10 transformer area operation rules are simulated by setting different parameters to collect multiple groups of data.
Further, the line loss abnormal data is judged and eliminated by the combined model of the K-means clustering algorithm-LOF local outlier factor detection method in the step 2, which is specifically as follows:
the combined model of the K-means clustering algorithm-LOF local outlier factor detection method is characterized in that discrete data are mainly clustered into K classes with high similarity through the K-means clustering algorithm, and the optimal K value is judged according to the size of a contour coefficient. After the data are aggregated into k classes, the size of an outlier factor (LOF) is calculated for the data in each class, the data with the overlarge outlier factor is judged as abnormal data, and elimination processing is carried out. The specific process is as follows:
(1.1) randomly selecting k points from a data set obtained by PSASP simulation as an initial clustering center;
(1.2) respectively calculating the Euclidean distance from each point to each cluster central point according to the formula (1), and distributing the sample concentration points to the class with the minimum distance;
Figure BDA0003101704850000031
in the formula, EUCLID represents Euclidean distance, xiIs the i-th variable value, y, of the sample xiIs the ith variable value of the centroid-like y;
(1.3) after all the sample data are distributed, assuming that the data are aggregated into k types, and the k cluster center points (namely mean value representative points) are m respectively1,m2,...,mkThen the square error of this class is calculated according to equation (2)And, determining whether to converge.
Figure BDA0003101704850000041
Where E is the sum of the squared errors of all objects in the data set, and x represents a point in sample space representing a given object; m isiIs of the class CiThe mean value of (a);
(1.4) updating a clustering center, repeating the steps (1.2) - (1.3) until convergence, and outputting a clustering result;
(1.5) judging the clustering effect by adopting an outline coefficient s, wherein the larger the value of s is, the better the clustering effect is; setting the contour coefficient of the ith element in the cluster as s (i), and expressing the contour coefficient s of the cluster by using the average value of the contour coefficients of all the elements, wherein the contour coefficient s (i) of one element is calculated as the formula (3):
Figure BDA0003101704850000042
wherein a (i) represents the average distance between the ith element and all other elements in the same class as the ith element; (i) represents the minimum average distance between the ith element and all points in all different classes of the element;
and (1.6) judging the outlier degree of the element by adopting a local outlier factor detection method, and screening abnormal data. Let k distance of object i be k-distance (i). The object set with the distance to the object i less than or equal to k-distance (i) is called k-th distance domain of the object i and is written as: nk (i).
In the sample space, if an object o exists, reachdist (i, o) represents the reachable distance between the object i and the object o, and the calculation formula is as follows:
reachdist(i,o)=max{k-distance(o),||i-o||} (4)
the local achievable density lrdk (i) of the object i is calculated as formula (5):
Figure BDA0003101704850000043
a data point outlier factor lofk (i) describing the degree of outlier of the ith element may be calculated according to equation (6). The larger the element outlier degree is, the larger the LOFk (i) value is, and the points with the LOFk (i) value larger than 2 are determined as outliers.
Figure BDA0003101704850000044
Where nk (i) represents the kth distance domain of object i, lrdk (o), lrdk (i) represent the local achievable densities of object o and object i, respectively.
Further, the convolutional neural network in step 3 is composed of a plurality of convolutional layers and downsampling layers, namely pooling layers, and the tail part of the convolutional neural network is connected with one or more full-connection layers; the convolutional layer and the pooling layer use the output result of each layer as the input of the next layer through a convolutional kernel, and perform layered extraction on the data characteristics by using the relationship between neurons of each layer, wherein the training process is as follows:
(2.1) firstly, initializing parameters, and setting weights and bias items;
(2.2) performing feedforward operation, namely identifying all training samples, inputting the samples into a convolutional neural network model, performing convolution processing, sequentially entering each operation layer, and obtaining an output value through forward propagation;
(2.3) comparing the output value and the true value of the convolutional neural network model, and calculating an error;
(2.4) judging whether the error is in a set range, if the error exceeds the set range, returning an output value to the convolutional neural network and carrying out back propagation; the process sequentially obtains the gradient of the error to the full-connection layer, the pooling layer and the convolution layer, and stops training if the obtained error is smaller than a defined expected value;
and (2.5) updating the weight and the bias parameter, and repeating the steps (2.2) to (2.4) until the accuracy meets the requirement or the preset upper limit of the iteration times is reached.
Further, the particle swarm algorithm is adopted to optimize the convolutional neural network in step 3, that is, in the error back propagation process, the optimal solution obtained by the particle swarm algorithm is input into the convolutional neural network as a weight and a threshold, and the specific process is as follows:
(3.1) after the Convolutional Neural Network (CNN) passes through a forward propagation process, calculating the error between the output value and the expected value by the formula (7), taking the error value as the input of the particle swarm algorithm, taking each error parameter as a particle in the PSO, and determining the number of the training parameters in the network as the particle length:
Figure BDA0003101704850000051
wherein E is the error between the output value and the desired value; y isp(t) outputting an expected value, namely an actual line loss value, for the network at the moment t of the p-th sample; y isp(t) is the output value of the network at the moment t of the p sample, namely the result of model prediction;
and (3.2) calculating the fitness fit of the PSO algorithm by the formula (8) to obtain a global optimal solution and an individual optimal solution.
Figure BDA0003101704850000052
In the formula (d)tAnd
Figure BDA0003101704850000053
the t actual output and the target output of the particle swarm algorithm are obtained; n is the number of training samples.
And (3.3) updating the positions and the speeds of the particles through the formulas (9) and (10), and obtaining new particles which are the updated CNN network weight and threshold.
Figure BDA0003101704850000061
Figure BDA0003101704850000062
In the formula (I), the compound is shown in the specification,
Figure BDA0003101704850000063
and
Figure BDA0003101704850000064
respectively representing the speed and the position of the ith particle in the d dimension in the k iteration; ω represents the coefficient of inertia; c. C1、c2Represents an acceleration constant; r isl、r2Represents a random number between 0 and 1; p is a radical ofidRepresenting the position on the d-th dimension in the ith particle history optimal position; p is a radical ofgdRepresenting the position in the d-th dimension of the population history optimal position.
And (3.4) repeating the steps (3.1) - (3.3) for the CNN network again until the error converges to the minimum value.
After being particlized, each network's threshold and weight particles uniquely correspond to a neural network, and if the position of the particle is updated, the corresponding neural network's threshold and weight are also updated.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Examples
The process of the invention is shown in fig. 1, and the operation steps of the embodiment are as follows:
step 1, a rural power grid model is built by using a PSASP system to perform data simulation, and the model structure diagram is shown in figure 2.1 transformer area with the capacity of 800kVA, 3 transformer areas with the capacity of 400kVA, 3 transformer areas with the capacity of 250kVA and 3 transformer areas with the capacity of 200kVA are respectively arranged; setting the line length between 0.15 and 0.3km according to the actual situation of a rural power grid; the types of the conducting wires are LGJ-90, LGJ-120 and LGJ-240; the load setting is as shown in table 1, and the load rate of the low-voltage distribution network platform area is set according to the 24-hour load change rule of the rural power grid. After the model is built, 10 transformer areas are collected through PSASP, 600 groups of data are collected in 60 days, and each group of data comprises 9 variables of the capacity of the distribution transformer, the total active power supply quantity, the total reactive power supply quantity, the maximum active power in 24h, the maximum reactive power in 24h, the total line length, the power supply radius, the sectional area of a wire and the active line loss value of the transformer areas.
TABLE 1 load Rate settings
Figure BDA0003101704850000071
Step 2, judging and eliminating line loss abnormal constant data by adopting a combined model of a K-means clustering algorithm-LOF local outlier factor detection method; firstly, performing K-means cluster analysis on acquired data, respectively taking 2-7K values, and judging the optimal cluster number according to the round width coefficient, wherein the contour coefficients of different cluster numbers are shown in a table 2.
TABLE 2 clustering number and profile coefficient statistical table
Figure BDA0003101704850000072
When the number of clusters is 2, the contour coefficient is the largest and is 0.9089, and the clustering effect is the best. Therefore, the number k of the clusters is selected to be 2, and the data set is subjected to cluster analysis. As shown in table 3, when the 600 sets of data are grouped into two types, the group 1 includes 207 sets of data in total, accounting for 34.5% of the total data, and the group 2 includes 393 sets of data in total, accounting for 65.5% of the total data. The clustering results are shown in fig. 3.
TABLE 3 statistics table for number of each category data
Figure BDA0003101704850000073
The invention judges the data with the cluster factor LOF larger than 2 as the abnormal point of the data. LOF outlier factor calculations were performed for class 1 and class 2, respectively, and an outlier factor of greater than 2 was found for a total of 12 data. Wherein there are a total of 4 data outlier factors greater than 2 in category 1 and 8 data outlier factors greater than 2 in category 2. And judging the 12 data as abnormal data and performing rejection processing. The calculation results of the outlier detection method are shown in table 4.
TABLE 4 outlier statistics
Figure BDA0003101704850000081
And 3, respectively adopting the CNN neural network and the PSO-CNN neural network optimized by the particle swarm optimization to predict the line loss of the data set from which the abnormal data are removed, and comparing, analyzing and optimizing the effect. The method selects 8 variables of total active power supply quantity of a transformer area, total reactive power supply quantity of the transformer area, 24h maximum active power, 24h maximum reactive power, total line length of a low-voltage transformer area, power supply radius, wire section area and transformer capacity as input variables of a convolutional neural network model, and takes a line loss value of a power distribution network as an output variable. And (3) simulating 588 group data which are remained after 12 data which are judged to be abnormal by the K-means-LOF algorithm are removed, wherein 488 group is used as a training sample set, and 100 groups are used as a testing sample set. According to the method, proper convolutional neural network parameters are set according to the size of a sample, two convolutional layers are set in total, the size of a convolutional kernel is 1 x 3, the number of convolutional kernels of each convolutional layer is 6 and 12 respectively, and a ReLU function is used as an activation function.
Model training was first performed using a separate Convolutional Neural Network (CNN). The CNN network iterates 6250 times to reach the preset accuracy value, which is 2 minutes and 2 seconds in common. The mean square error of the test set was 0.0234 and the mean square error was 0.1529. The comparison result of the actual value and the predicted value of the prediction result of the test set is shown in FIG. 4. The percent error for the test set data was mostly less than 10%, the fitted linear regression equation was 0.9214x +0.2231 with correlation coefficient R of 0.9343 and R-square of 0.8701. The sample error percentage is shown in fig. 5 and the scatter fit is shown in fig. 6.
And performing model training on the line loss sample set by adopting the PSO-CNN neural network optimized by the particle swarm. The PSO-CNN network after PSO optimization converges after 3750 iterations, and the time consumption is 1 minute and 18 seconds. The mean square error of the test set was 0.0109, and the mean square error was 0.1045. The comparison result of the actual value and the predicted value of the prediction result of the test set is shown in FIG. 7. The majority of the test set data had errors less than 8%, the fitted linear regression equation was y 0.9689x +0.0385, the correlation coefficient R was 0.9886, and the R-square was 0.9754. The sample error percentage is shown in fig. 8, and the scatter fit is shown in fig. 9.
Table 5 is a comparative analysis of the training results of the CNN network and the PSO-CNN network, and it can be clearly seen that the convolutional neural network optimized by the particle swarm optimization is superior to the simple convolutional neural network in terms of the iteration number, the convergence time, the error, and the scatter fitting degree.
TABLE 5 comparative analysis of CNN and PSO-CNN
Figure BDA0003101704850000091
In conclusion, compared with the traditional method, the method has the advantages that the line loss prediction speed and accuracy are remarkably improved, and the method has higher practical application value.

Claims (5)

1. A method for predicting line loss of a distribution room based on clustering and convolutional neural networks is characterized by comprising the following steps:
step 1, building a power grid model by adopting PSASP software, and collecting line loss data of a transformer area;
step 2, judging and eliminating line loss abnormal constant data by adopting a combined model of a K-means clustering algorithm-LOF local outlier factor detection method;
and 3, optimizing the convolutional neural network by adopting a particle swarm optimization to obtain a PSO-CNN neural network, and performing predictive analysis on the line loss of the transformer area by using the PSO-CNN neural network.
2. The method for predicting the line loss of the transformer area based on the clustering and the convolutional neural network as claimed in claim 1, wherein a power grid model is built by using PSASP software in the step 1, and transformer area line loss data are collected, specifically as follows:
adopt PSASP to build a low pressure rural power distribution network, set up 10/0.4kV transformers under the 10kV generating line altogether, 10 platform districts promptly, wherein draw 2 main lines down and connect resident power consumption load under 3 platform districts, draw 3 main lines down and connect resident power consumption load under 4 platform districts, draw 4 main lines down and connect resident power consumption load under 3 platform districts, through setting up 10 platform district operation laws of different parameter simulation, in order to gather multiunit data.
3. The method for predicting the line loss of the distribution room based on the clustering and the convolutional neural network as claimed in claim 1, wherein the line loss abnormal data is judged and removed by adopting a combined model of a K-means clustering algorithm-LOF local outlier factor detection method in the step 2, and the method is as follows:
the combined model of the K-means clustering algorithm-LOF local outlier factor detection method firstly gathers discrete data into K classes through the K-means clustering algorithm, and judges the optimal K value according to the size of the contour coefficient;
after the data are aggregated into k classes, calculating the size of an outlier LOF (loss of field) factor for the data in each class, judging the data with the outlier factor larger than a threshold value as abnormal data and performing rejection processing, wherein the specific process comprises the following steps:
(1.1) randomly selecting k points from a data set obtained by PSASP simulation as an initial clustering center;
(1.2) respectively calculating the Euclidean distance from each point to each cluster central point according to the formula (1), and distributing the sample concentration points to the class with the minimum distance;
Figure FDA0003101704840000011
in the formula, EUCLID represents Euclidean distance, xiIs the i-th variable value, y, of the sample xiIs the ith variable value of the centroid-like y;
(1.3) after all the sample data are distributed, assuming that the data are aggregated into k types, and the k cluster center points, namely the mean value representative points are m respectively1,m2,...,mkThen calculate the class according to equation (2)And (3) the sum of squared errors, judging whether convergence occurs:
Figure FDA0003101704840000021
where E is the sum of the squared errors of all objects in the data set, and x represents a point in sample space representing a given object; m isiIs of the class CiThe mean value of (a);
(1.4) updating a clustering center, repeating the steps (1.2) - (1.3) until convergence, and outputting a clustering result;
(1.5) judging the clustering effect by adopting an outline coefficient s, wherein the larger the value of s is, the better the clustering effect is; setting the contour coefficient of the ith element in the cluster as s (i), and expressing the contour coefficient s of the cluster by using the average value of the contour coefficients of all the elements, wherein the contour coefficient s (i) of one element is calculated as the formula (3):
Figure FDA0003101704840000022
wherein a (i) represents the average distance between the ith element and all other elements in the same class as the ith element; (i) represents the minimum average distance between the ith element and all points in all different classes of the element;
(1.6) judging the outlier degree of the element by adopting a local outlier factor detection method, and screening abnormal data; marking k distance of an object i as k-distance (i), and a set of objects with the distance less than or equal to the k-distance (i) to the object i as a k distance domain of the object i, and marking as Nk (i);
in the sample space, if an object o exists, reachdist (i, o) represents the reachable distance between the object i and the object o, and the calculation formula is as follows:
reachdist(i,o)=max{k-distance(o),||i-o||} (4)
the local achievable density lrdk (i) of the object i is calculated as formula (5):
Figure FDA0003101704840000023
calculating a data point outlier factor lofk (i) describing the degree of outlier of the ith element according to equation (6); the larger the element outlier, the larger the lofk (i) value, and the points with lofk (i) value greater than 2 are determined as outliers:
Figure FDA0003101704840000024
wherein nk (i) represents the kth distance domain of subject i; lrdk (o), lrdk (i) represent the local achievable density of object o and object i, respectively.
4. The method for predicting the line loss of the transformer area based on the clustering and the convolutional neural network as claimed in claim 1, wherein the convolutional neural network in the step 3 is composed of a plurality of sets of convolutional layers and downsampling layers, namely pooling layers, and one or more fully-connected layers are connected to the tail part; the convolutional layer and the pooling layer use the output result of each layer as the input of the next layer through a convolutional kernel, and perform layered extraction on the data characteristics by using the relationship between neurons of each layer, wherein the training process is as follows:
(2.1) firstly, initializing parameters, and setting weights and bias items;
(2.2) performing feedforward operation, namely identifying all training samples, inputting the samples into a convolutional neural network model, performing convolution processing, sequentially entering each operation layer, and obtaining an output value through forward propagation;
(2.3) comparing the output value and the true value of the convolutional neural network model, and calculating an error;
(2.4) judging whether the error is in a set range, if the error exceeds the set range, returning an output value to the convolutional neural network and carrying out back propagation; the process sequentially obtains the gradient of the error to the full-connection layer, the pooling layer and the convolution layer, and stops training if the obtained error is smaller than a defined expected value;
and (2.5) updating the weight and the bias parameter, and repeating the steps (2.2) to (2.4) until the accuracy meets the requirement or the preset upper limit of the iteration times is reached.
5. The method for predicting the line loss of the distribution room based on the clustering and the convolutional neural network as claimed in claim 4, wherein the step 3 optimizes the convolutional neural network by using the particle swarm algorithm, that is, in the error back propagation process, the optimal solution obtained by the particle swarm algorithm is input into the convolutional neural network as a weight and a threshold, and the specific process is as follows:
(3.1) after the Convolutional Neural Network (CNN) passes through a forward propagation process, calculating the error between the output value and the expected value by the formula (7), taking the error value as the input of the particle swarm algorithm, taking each error parameter as a particle in the PSO, and determining the number of the training parameters in the network as the particle length:
Figure FDA0003101704840000031
wherein E is the error between the output value and the desired value; y isp(t) outputting an expected value, namely an actual line loss value, for the network at the moment t of the p-th sample; y isp(t) is the output value of the network at the moment t of the p sample, namely the result of model prediction;
(3.2) calculating the fitness fit of the PSO algorithm by the formula (8) to obtain a global optimal solution and an individual optimal solution:
Figure FDA0003101704840000032
in the formula (d)tAnd
Figure FDA0003101704840000033
the t actual output and the target output of the particle swarm algorithm are obtained; n is the number of training samples;
and (3.3) updating the positions and the speeds of the particles through the formulas (9) and (10), wherein the obtained new particles are the updated CNN network weight and threshold:
Figure FDA0003101704840000041
Figure FDA0003101704840000042
in the formula (I), the compound is shown in the specification,
Figure FDA0003101704840000043
and
Figure FDA0003101704840000044
respectively representing the speed and the position of the ith particle in the d dimension in the k iteration; ω represents the coefficient of inertia; c. C1、c2Represents an acceleration constant; r isl、r2Represents a random number between 0 and 1; p is a radical ofidRepresenting the position on the d-th dimension in the ith particle history optimal position; p is a radical ofgdRepresenting a position in the d-th dimension in the group history optimal position;
(3.4) repeating the steps (3.1) - (3.3) in the forward propagation process of the CNN network again until the error converges to the minimum value;
after being particlized, each network's threshold and weight particles uniquely correspond to a neural network, and if the position of the particle is updated, the corresponding neural network's threshold and weight are also updated.
CN202110626923.8A 2021-06-04 2021-06-04 Cluster and convolutional neural network-based line loss prediction method for transformer area Withdrawn CN113379116A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110626923.8A CN113379116A (en) 2021-06-04 2021-06-04 Cluster and convolutional neural network-based line loss prediction method for transformer area

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110626923.8A CN113379116A (en) 2021-06-04 2021-06-04 Cluster and convolutional neural network-based line loss prediction method for transformer area

Publications (1)

Publication Number Publication Date
CN113379116A true CN113379116A (en) 2021-09-10

Family

ID=77575936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110626923.8A Withdrawn CN113379116A (en) 2021-06-04 2021-06-04 Cluster and convolutional neural network-based line loss prediction method for transformer area

Country Status (1)

Country Link
CN (1) CN113379116A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114046873A (en) * 2021-11-17 2022-02-15 国家电网有限公司 Reactor vibration monitoring system based on LOF-FCM fuzzy clustering algorithm
CN116757443A (en) * 2023-08-11 2023-09-15 北京国电通网络技术有限公司 Novel power line loss rate prediction method and device for power distribution network, electronic equipment and medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114046873A (en) * 2021-11-17 2022-02-15 国家电网有限公司 Reactor vibration monitoring system based on LOF-FCM fuzzy clustering algorithm
CN116757443A (en) * 2023-08-11 2023-09-15 北京国电通网络技术有限公司 Novel power line loss rate prediction method and device for power distribution network, electronic equipment and medium
CN116757443B (en) * 2023-08-11 2023-10-27 北京国电通网络技术有限公司 Novel power line loss rate prediction method and device for power distribution network, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN112508275B (en) Power distribution network line load prediction method and equipment based on clustering and trend indexes
CN110991786B (en) 10kV static load model parameter identification method based on similar daily load curve
CN108564192A (en) A kind of short-term photovoltaic power prediction technique based on meteorological factor weight similar day
CN111722046B (en) Transformer fault diagnosis method based on deep forest model
CN112149873B (en) Low-voltage station line loss reasonable interval prediction method based on deep learning
CN104408562A (en) Photovoltaic system generating efficiency comprehensive evaluation method based on BP (back propagation) neural network
Zhang et al. Short-term power load forecasting using integrated methods based on long short-term memory
CN112735097A (en) Regional landslide early warning method and system
CN113379116A (en) Cluster and convolutional neural network-based line loss prediction method for transformer area
CN113011084B (en) Intelligent identification method for power transmission line fault reasons based on correlation vector machine
CN110705859A (en) PCA-self-organizing neural network-based method for evaluating running state of medium and low voltage distribution network
CN115600729A (en) Grid load prediction method considering multiple attributes
CN111008726A (en) Class image conversion method in power load prediction
CN112288157A (en) Wind power plant power prediction method based on fuzzy clustering and deep reinforcement learning
CN112085108A (en) Photovoltaic power station fault diagnosis algorithm based on automatic encoder and K-means clustering
CN113762591B (en) Short-term electric quantity prediction method and system based on GRU and multi-core SVM countermeasure learning
CN110991689A (en) Distributed photovoltaic power generation system short-term prediction method based on LSTM-Morlet model
CN107577896B (en) Wind power plant multi-machine aggregation equivalent method based on hybrid Copula theory
CN114357670A (en) Power distribution network power consumption data abnormity early warning method based on BLS and self-encoder
CN116307139A (en) Wind power ultra-short-term prediction method for optimizing and improving extreme learning machine
CN113949079B (en) Power distribution station user three-phase unbalance prediction optimization method based on deep learning
Lu et al. A deep belief network based model for urban haze prediction
Ramsami et al. Neural Network Frameworks for Electricity Forecasting in Mauritius and Rodrigues Islands
CN114692729A (en) New energy station bad data identification and correction method based on deep learning
CN114254828A (en) Power load prediction method based on hybrid convolution feature extractor and GRU

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20210910