CN115983477A - Load prediction method based on K-means clustering and convolutional neural network model - Google Patents

Load prediction method based on K-means clustering and convolutional neural network model Download PDF

Info

Publication number
CN115983477A
CN115983477A CN202310009803.2A CN202310009803A CN115983477A CN 115983477 A CN115983477 A CN 115983477A CN 202310009803 A CN202310009803 A CN 202310009803A CN 115983477 A CN115983477 A CN 115983477A
Authority
CN
China
Prior art keywords
data
neural network
convolutional neural
load
means clustering
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
CN202310009803.2A
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.)
Hunan Datang Xianyi Technology Co ltd
Original Assignee
Hunan Datang Xianyi Technology 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 Hunan Datang Xianyi Technology Co ltd filed Critical Hunan Datang Xianyi Technology Co ltd
Priority to CN202310009803.2A priority Critical patent/CN115983477A/en
Publication of CN115983477A publication Critical patent/CN115983477A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a load prediction method based on a K-means clustering and convolutional neural network model, which comprises the following steps: acquiring power load actual measurement data, preprocessing the data, and clustering the preprocessed data based on a K-means clustering algorithm; decomposing the clustered data by using a VMD algorithm, constructing a CNN (convolutional neural network) according to the decomposed data, and extracting power load characteristics and holiday load characteristics; load prediction is carried out on the data through a CNN convolutional neural network, and a load prediction result is obtained and analyzed; the method classifies the data into several types with stronger regularity through K-means clustering, has better noise interference resistance and high resolution precision on complex data, and improves the algorithm precision; in addition, the invention adds codes for stopping training in advance when the learning rate is reduced and certain conditions are met in the training process, thereby not only ensuring the training precision, but also greatly reducing the training time.

Description

Load prediction method based on K-means clustering and convolutional neural network model
Technical Field
The invention relates to the technical field of power load prediction, in particular to a load prediction method based on a K-means clustering and convolutional neural network model.
Background
The main principle of the load numerical prediction method is that real power load data of a future system running at a certain moment is obtained according to various comprehensive factors such as various capacity-increasing load decisions, natural conditions, running load characteristics, influence relations with social conditions and the like on a future power system under the premise of simultaneously meeting the precision requirement of the certain aspect, wherein the actual power load data generally mainly refers to the average number of demands (power) of user power energy or the current annual total social power utilization plan of a user; load forecasting has been another important element in the electric energy economic distribution and dispatching system in the power system, and it is also a very important module in the distributed energy dispatching management system (EMS) system that should not be ignored.
The main principle of load prediction is to find the relation between the fluctuation of the load of the power system and the influence factors thereof through the previously recorded data and infer the load prediction work of the power system according to the relation, and the main principle of load prediction is to find the relation between the fluctuation of the load of the power system and the influence factors thereof through the previously recorded data and infer the load change in the long future according to the relation.
In recent years, neural network algorithms and deep learning are gradually proposed and used by people, and researches on high-precision load prediction by using algorithms in the aspect of deep neural networks are more and more; the deep neural network has the capability of automatically learning the characteristics of data, can perform better condition fitting on a complex nonlinear system under the conditions of proper neural network structure and proper and sufficient training data after screening, but generally needs longer training time compared with other traditional methods, and the difficulty of network training is also improved by training and adjusting various parameters in the deep neural network.
The introduced method is mostly used for predicting a certain determined time point of the load, that is, the output expectation of the prediction model is a determined value, however, a power generation side and a demand side of a power grid have a plurality of uncertain factors, and the uncertainty of the power prediction cannot be clearly reflected by the point prediction method for the load prediction, so that a power production decision is at a certain risk; compared with point prediction, the interval prediction method greatly expands the output range of a prediction model, reduces the influence of some uncertain factors on the precision of a prediction result, and enables power grid decision-making personnel to better know the possible fluctuation condition of the power load in a time period in the future, so the method has important significance in the aspect of engineering.
Disclosure of Invention
This section is for the purpose of summarizing some aspects of embodiments of the invention and to briefly introduce some preferred embodiments. In this section, as well as in the abstract and the title of the invention of this application, simplifications or omissions may be made to avoid obscuring the purpose of the section, the abstract and the title, and such simplifications or omissions are not intended to limit the scope of the invention.
The present invention has been made in view of the above-mentioned problems.
In a first aspect of the embodiments of the present invention, a load prediction method based on K-means clustering and a convolutional neural network model is provided, including: acquiring power load actual measurement data, preprocessing the data, and clustering the preprocessed data based on a K-means clustering algorithm; decomposing the clustered data by using a VMD algorithm, constructing a CNN (convolutional neural network) according to the decomposed data, and extracting power load characteristics and holiday load characteristics; and carrying out load prediction on the data through the CNN convolutional neural network, and obtaining and analyzing the load prediction result.
As a preferable scheme of the load prediction method based on the K-means clustering and the convolutional neural network model, the load prediction method comprises the following steps: the pre-treatment process comprises the following steps of,
collecting actual measurement data of the power load of each power consumer in 2019-2021 every hour, and recording weather characteristic data and holiday characteristic data of the area;
performing missing value filling, abnormal value processing and data normalization processing on the acquired data;
for data of the numerical type, the calculation of the data normalization process includes,
Figure BDA0004037532750000021
wherein x represents the sample data collected, x min Representing the minimum value, x, in the acquired sample data max Representing the maximum value in the acquired sample data.
As a preferable scheme of the load prediction method based on the K-means clustering and the convolutional neural network model, the load prediction method comprises the following steps: the clustering process includes the steps of,
randomly selecting k sample points from the preprocessed data sample set as the centers of all clusters, and calculating the distance between the point in each sample set and the center point of the k samples;
according to the calculation of the distance, distributing the points in each sample set to the sample cluster with the minimum distance from the points, and calculating the centroid of each cluster after re-division again;
calculating the distance between each sample point and the updated centroid of each sample, and repeating the steps in an analogical manner until the centroid of each sample cluster is not changed;
the calculation of the main optimization objectives of the K-means algorithm includes,
Figure BDA0004037532750000031
wherein K represents the number of clusters to be divided designated in advance, C i Represents the calculated centroid of each cluster, x represents the sample point in each cluster, dist (C) i And x) represents a distance from the center point of the ith cluster.
As a preferable scheme of the load prediction method based on the K-means clustering and the convolutional neural network model of the present invention, wherein: the decomposition of the VMD algorithm includes,
the VMD algorithm decomposes the preprocessed power load sequence data into different modal components, changes a constraint problem into a non-constraint problem by utilizing a secondary punishment and a Lagrange multiplier, and solves the non-constraint problem by using an alternative direction multiplier method;
obtaining all the modes of signal decomposition through iterative updating, and respectively modeling, predicting and reconstructing a plurality of obtained mode component subsequences;
the calculation of the problem includes that,
Figure BDA0004037532750000032
/>
Figure BDA0004037532750000033
wherein u is k Representing the decomposed k modal components, w k The center frequency of the kth decomposed signal quantity is represented, t represents the time,
Figure BDA0004037532750000035
denotes differentiating the time t, and δ (t) denotes the unit impulseClick function, j represents an imaginary unit, which represents a convolution symbol, | · | | calcuation |, i 2 And f (t) represents the power load data at the time t after exception processing.
As a preferable scheme of the load prediction method based on the K-means clustering and the convolutional neural network model of the present invention, wherein: the construction of the CNN convolutional neural network comprises,
inputting training sets in K modal components of the power load data subjected to preprocessing, K-means clustering processing and VMD stabilization into the convolutional layer for feature extraction;
carrying out nonlinear mapping on the output of the convolutional layer through a sigmoid activation function;
the calculation of the activation function includes that,
Figure BDA0004037532750000034
wherein h (x) represents the output of the activation function and x represents the input of the activation function;
inputting the output of the activation function into a pooling layer, and compressing the feature data by adopting a maximum pooling method under the condition of keeping the features of the feature data;
and performing weighting calculation on the compressed feature data through a full connection layer, stacking the convolution layer and the pooling layer, and outputting integrated feature information to a dropout layer.
As a preferable scheme of the load prediction method based on the K-means clustering and the convolutional neural network model of the present invention, wherein: the construction of the dropout layer includes,
when the input of the dropout layer is transmitted in the forward direction, a regularization method is used, the activation values of the neurons stop working at a certain probability p, namely, part of the neurons are lost, and overfitting of a neural network is avoided.
As a preferable scheme of the load prediction method based on the K-means clustering and the convolutional neural network model, the load prediction method comprises the following steps: also comprises the following steps of (1) preparing,
introducing learning rate attenuation to judge whether to finish training in advance according to the analysis of the prediction result, changing the learning efficiency through reduce LROnPrateau by adopting a theory that the learning rate is gradually reduced along with the increase of the iteration time, and reducing the learning efficiency after finding that the loss value is not reduced or the acc value is not increased any more;
the problem that the calculation amount is increased and the consumed time is long due to the complex nature of the network of the LSTM is solved by introducing a code for finishing training in advance;
callbacks can determine the action to be performed at the time of the next epoch start or end, can directly call the interfaces in the Callbacks for which "acc", "val _ acc", "loss" and "val _ loss" are set, and stop and continue to practice when the loss value on the training set is not in the reduced range.
In a second aspect of the embodiments of the present invention, a load prediction system based on K-means clustering and a convolutional neural network model is provided, including:
the data processing module is used for acquiring power load actual measurement data, preprocessing the data and clustering the preprocessed data based on a K-means clustering algorithm;
the network construction module is used for decomposing the clustered data by utilizing a VMD algorithm, constructing a CNN (convolutional neural network) according to the decomposed data and extracting power load characteristics and holiday load characteristics;
and the load prediction module is used for predicting the load of the data through the CNN convolutional neural network to obtain and analyze the load prediction result.
In a third aspect of embodiments of the present invention, there is provided an apparatus, comprising,
a processor;
a memory for storing processor-executable instructions;
the processor is configured to invoke the instructions stored by the memory to perform the method of any embodiment of the invention.
In a fourth aspect of the embodiments of the present invention, there is provided a computer-readable storage medium having stored thereon computer program instructions, including:
which when executed by a processor implement the method according to any of the embodiments of the invention.
The invention has the beneficial effects that: the load prediction method based on the K-means clustering and the convolutional neural network model predicts the load according to the characteristics of historical load, holiday data and the like, classifies the data into several types with stronger regularity through the K-means clustering, has the advantages of better noise interference resistance, high resolution precision on complex data and the like, and improves the algorithm precision; in addition, the invention adds a code for stopping training in advance when the learning rate is reduced and a certain condition is met in the training process, thereby not only ensuring the training precision, but also greatly reducing the training time; besides the prediction mode of the prediction day, the prediction mode of the total week, the rolling day and the total month is added, and the load prediction precision of the holidays is improved to a certain extent.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise. Wherein:
FIG. 1 is an overall flowchart of the load prediction method based on K-means clustering and a convolutional neural network model provided by the present invention;
FIG. 2 is a flow chart of a neural network prediction method of the load prediction method based on the variational modal decomposition and long-short term memory hybrid model provided by the invention;
FIG. 3 is a schematic diagram of a convolutional neural network of the load prediction method based on K-means clustering and a convolutional neural network model provided by the present invention;
FIG. 4 is a K-means clustering algorithm flow chart of the load prediction method based on K-means clustering and a convolutional neural network model provided by the invention;
FIG. 5 is a graph of the decay of learning rate for the load prediction method based on K-means clustering and convolutional neural network models provided by the present invention;
FIG. 6 is a line graph of Epoch accuracy of the load prediction method based on K-means clustering and a convolutional neural network model provided by the present invention;
FIG. 7 is a comparison graph of the actual value, non-classified prediction, classification + decomposition prediction results of the load prediction method based on K-means clustering and convolutional neural network models provided by the present invention;
FIG. 8 is a graph comparing non-cluster prediction, cluster + decomposition prediction results map of the load prediction method based on K-means clustering and convolutional neural network models provided by the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, specific embodiments accompanied with figures are described in detail below, and it is apparent that the described embodiments are a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, but the present invention may be practiced in other ways than those specifically described and will be readily apparent to those of ordinary skill in the art without departing from the spirit of the present invention, and therefore the present invention is not limited to the specific embodiments disclosed below.
Furthermore, reference herein to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one implementation of the invention. The appearances of the phrase "in one embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments.
The present invention will be described in detail with reference to the drawings, wherein the cross-sectional views illustrating the structure of the device are not enlarged partially in general scale for convenience of illustration, and the drawings are only exemplary and should not be construed as limiting the scope of the present invention. In addition, the three-dimensional dimensions of length, width and depth should be included in the actual fabrication.
Also in the description of the present invention, it should be noted that the terms "upper, lower, inner and outer" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, which are only for convenience of description and simplification of description, but do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms first, second, or third are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
The terms "mounted, connected and connected" in the present invention are to be understood broadly, unless otherwise explicitly specified or limited, for example: can be fixedly connected, detachably connected or integrally connected; they may be mechanically, electrically, or directly connected, or indirectly connected through intervening media, or may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Example 1
Referring to fig. 1 to 6, an embodiment of the present invention provides a load prediction method based on a K-means cluster and convolutional neural network model, including:
s1: the method comprises the steps of collecting power load actual measurement data, preprocessing the data, and clustering the preprocessed data based on a K-means clustering algorithm. It should be noted that:
the pre-treatment process comprises the following steps of,
collecting actual measurement data of the power load of each power consumer in 2019-2021 every hour, recording weather characteristic data and holiday characteristic data of the area, and performing missing value filling, abnormal value processing and data normalization processing on the collected data;
it should be noted that, for numerical data, the calculation of the data normalization process includes,
Figure BDA0004037532750000071
wherein x represents the sample data collected, x min Representing the minimum value, x, in the acquired sample data max Representing a maximum value in the collected sample data;
further, as shown in fig. 4, the clustering process of the preprocessed data based on the K-means clustering algorithm includes,
randomly selecting k sample points from the preprocessed data sample set as the centers of all clusters, and calculating the distance between the point in each sample set and the center point of the k samples;
according to the calculated distance, distributing the points in each sample set to the sample cluster with the minimum distance from the points, and calculating the mass center of each cluster after re-division again;
calculating the distance between each sample point and the updated centroid of each sample, and repeating the steps in an analogized manner until the centroid of each sample cluster is not changed any more;
it should be noted that the calculation of the main optimization objectives of the K-means algorithm includes,
Figure BDA0004037532750000072
wherein K represents the number of clusters to be divided designated in advance, C i Represents the calculated centroid of each cluster, x represents the sample point in each cluster, dist (C) i And x) represents a distance from the center point of the ith cluster.
S2: and decomposing the data after the clustering processing by using a VMD algorithm, constructing a CNN (convolutional neural network) according to the decomposed data, and extracting the power load characteristics and the holiday load characteristics. It should be noted that:
decomposing the preprocessed power load sequence data into different modal components by a VMD (vector modeling and decomposition) algorithm, changing the constraint problem into an unconstrained problem by utilizing a secondary penalty and a Lagrange multiplier, solving the unconstrained problem by using an alternate direction multiplier method, obtaining all the modes of signal decomposition through iterative updating, and respectively modeling, predicting and reconstructing a plurality of obtained modal component subsequences;
specifically, the calculation of the problem includes,
Figure BDA0004037532750000081
Figure BDA0004037532750000082
wherein u is k Representing the decomposed k modal components, w k The center frequency of the kth decomposed signal quantity is represented, t represents the time,
Figure BDA0004037532750000084
represents differentiating the time t, δ (t) represents a unit impact function, j represents an imaginary unit, represents a convolution symbol, | · u | | non-calculation 2 Expressing a two-normal form function, s.t. expressing constraint conditions, and f (t) expressing the power load data at the time t after exception processing;
further, as shown in fig. 3, the construction of the CNN convolutional neural network includes,
inputting training sets in K modal components of the power load data subjected to preprocessing, K-means clustering processing and VMD stabilization into the convolutional layer for feature extraction, and performing nonlinear mapping on the output of the convolutional layer through a sigmoid activation function;
it should be noted that the calculation of the activation function includes,
Figure BDA0004037532750000083
wherein h (x) represents the output of the activation function and x represents the input of the activation function;
further, inputting the output of the activation function into a pooling layer, compressing the feature data by adopting a maximum pooling method under the condition of keeping the features of the feature data, performing weighted calculation on the compressed feature data through a full-connection layer, stacking the convolution layer and the pooling layer, and integrating the feature information and outputting the integrated feature information to a dropout layer;
it should be noted that when the input of the dropout layer is propagated forward, a regularization method is used to stop the activation values of the neurons at a certain probability p, that is, part of the neurons are lost, so as to avoid overfitting of the neural network;
it should be noted that for data with spatial (or temporal) correlation, the one-dimensional CNN can well recognize simple patterns in the data compared to a simple fully-connected neural network, and then use these simple patterns to generate more complex patterns in a deeper convolutional layer, thereby obtaining key time-series feature information; the use of one-dimensional CNN networks is very effective when features of interest need to be extracted from a (fixed length) segment of a certain length in the overall dataset, and the locations of these features in this data segment are not highly correlated.
S3: and carrying out load prediction on the data through the CNN convolutional neural network, and obtaining and analyzing a load prediction result. It should be noted that:
as shown in fig. 5, learning is accelerated in the early stage of algorithm optimization, so that the model is easier to approach to a local or global optimal solution, but the model fluctuates greatly in the later stage, and even the value of the loss function wanders around the minimum value, and the value fluctuates greatly, so that the optimal solution is difficult to achieve all the time;
therefore, learning rate attenuation is introduced to judge whether to finish training in advance according to an analysis and prediction result, the learning efficiency is changed through reduce LROnPateau by adopting a theory that the learning rate is gradually reduced along with the increase of iteration time, and the learning efficiency is reduced after the loss value is found not to be reduced or the acc value is found not to be increased;
specifically, the meaning of each parameter is shown in table 1, and the code examples are as follows:
Figure BDA0004037532750000091
table 1: the meaning of the parameters.
Figure BDA0004037532750000092
/>
Figure BDA0004037532750000101
Furthermore, a code for finishing training in advance is introduced to solve the problems of increased calculation amount and long time consumption brought by the complex nature of the network of the LSTM, callbacks can determine the action to be implemented at the starting or ending time of the next epoch, can directly call the interfaces of Callbacks in which 'acc', 'val _ acc', 'loss' and 'val _ loss' are set, and stops and continues to practice when the loss value on the training set is not in the reduction range;
it should be noted that, in the training process as shown in fig. 6, the best validation set accuracy up to now is recorded, and if the accuracy is not reached at the best accuracy for 10 consecutive epochs (or more), the accuracy is considered not to be improved;
it should be noted that the parameters of EarlyStopping are as follows:
(1) monitor: in a monitoring management system, a data monitoring interface comprises 'acc', 'val _ acc', 'loss', 'val _ loss', and in a common general situation, as long as a verification data set exists, the 'val _ acc' can be selected for verification or 'val _ loss' can be selected for verification;
(2) min _ delta: an increasing or decreasing threshold value, which can only be considered as an improvement if this value is exceeded; the value range of the value is not only the monitor of you, but also the tolerable degree of the change of you can be reflected at the same time; for example, the person using the monitor is 'acc', but since the range of variation is generally limited to the range of minus ninety percent of seventy percent, the person is not concerned about the variation in the range of less than zero and one percent; in addition, a rule that the jittering condition occurs for multiple times in the whole training process (namely descending first and ascending later) can be obtained through observation, so that a writer is required to properly increase the degree of tolerance change, and the degree is finally set to be 0.003%;
(3) patience: the jitter tolerance is not improved in many epoch values, and the design method is actually mainly designed for the purpose of making a small tradeoff between the tolerable jitter range and the reduced jitter range with the maximum accuracy which can be actually realized by modeling; if your reference value is higher than the set value, the maximum accuracy of the result obtained in the final calculation of the model, i.e. substantially less than the maximum achievable accuracy of the calculation achievable in practice of the model; if we compare the modeled probability value with the set value to be lower, the modeling will probably be that the modeling is jittered in the early stage of the motion, and at this stage after completing the whole graph search operation, the modeling will already start to automatically terminate in the motion stage, so the accuracy is very general and even probably poor; the jitter degree of the Patience function is not absolutely positive with respect to the learning rate, and on the premise that no learning rate is set, the jitter degree and the learning rate are observed for several hours to obtain the maximum epoch number in the early stage, and the Patience value is adjusted after the jitter degree and the learning rate are slightly larger; on the premise that the learning rate does not change significantly, we also note to find an epoch number that is slightly larger but much lower than the maximum jitter level; we have personally determined that early stopping, before being incorporated into EarlyStopping, should be able to calculate another result relative to what is more readily perceived by the general public, earlyStopping should also be able to calculate one of the benefits, and we should then set the absolute value of the probability value to be higher, and set it to be the maximum value of the jitter epochneumber;
(4) mode: there are three possibilities "auto", "min" and "max".
It should be noted that the load prediction method based on the K-means clustering and the convolutional neural network model predicts the load according to the characteristics of historical load, holiday data and the like, classifies the data into several types with stronger regularity through the K-means clustering, has the advantages of better noise interference resistance, high decomposition precision of complex data and the like, and improves the algorithm precision; in addition, the invention adds a code for stopping training in advance when the learning rate is reduced and certain conditions are met in the training process, thereby not only ensuring the training precision, but also greatly reducing the training time; besides the prediction mode of the prediction day, the prediction modes of the weekly sum, the rolling day and the monthly sum are added, and the load prediction precision of the holidays is improved to a certain degree.
In a second aspect of the present disclosure,
providing a load prediction system based on a K-means clustering and convolutional neural network model, comprising:
the data processing module is used for acquiring power load actual measurement data, preprocessing the data and clustering the preprocessed data based on a K-means clustering algorithm;
the network construction module is used for decomposing the clustered data by utilizing a VMD algorithm, constructing a CNN (convolutional neural network) according to the decomposed data and extracting power load characteristics and holiday load characteristics;
and the load prediction module is used for performing load prediction on the data through the CNN convolutional neural network to obtain and analyze a load prediction result.
In a third aspect of the present disclosure,
there is provided an apparatus comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to invoke the memory-stored instructions to perform the method of any of the preceding.
In a fourth aspect of the present disclosure,
there is provided a computer readable storage medium having computer program instructions stored thereon, comprising:
the computer program instructions, when executed by a processor, implement the method of any of the preceding.
The present invention may be methods, apparatus, systems, and/or computer program products that may include a computer-readable storage medium having computer-readable program instructions embodied therewith for performing various aspects of the present invention.
The computer-readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as a punch card or an in-groove protruding structure with instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
Example 2
Referring to fig. 7 to 8, a second embodiment of the present invention is different from the first embodiment in that verification tests of the load prediction method based on the K-means clustering and the convolutional neural network model are provided to verify and explain technical effects adopted in the method.
In this embodiment, actual measurement data of power loads of each power consumer 2019-2021 in each hour in a certain area is collected, and weather feature data and holiday feature data of the area are recorded, fig. 7 is a comparison line graph of prediction results of three cases of clustering, clustering failure and clustering plus VMD decomposition performed on power load data of a certain consumer in one day, and fig. 8 is a comparison line graph of prediction results of three cases of clustering, clustering failure and clustering plus VMD decomposition performed on power load data of a certain consumer in 5 days.
Comparing the load prediction method based on the K-means clustering and the convolutional neural network model provided by the invention with a traditional LSTM structure model, wherein the result is shown in a table 2;
table 2: and predicting the performance index.
Figure BDA0004037532750000131
From table 2, it can be seen that the method provided by the present invention has excellent performance on three evaluation indexes of root mean square error, average absolute error and goodness of fit, which indicates that the load prediction based on K-means clustering and convolutional neural network model has more accurate prediction result, lower computation complexity, better anti-noise interference and high capability of decomposing complex data.
It should be noted that the above-mentioned embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, which should be covered by the claims of the present invention.

Claims (10)

1. The load prediction method based on the K-means clustering and the convolutional neural network model is characterized by comprising the following steps:
acquiring power load actual measurement data, preprocessing the data, and clustering the preprocessed data based on a K-means clustering algorithm;
decomposing the clustered data by using a VMD algorithm, constructing a CNN (convolutional neural network) according to the decomposed data, and extracting power load characteristics and holiday load characteristics;
and performing load prediction on data through the CNN convolutional neural network, and acquiring and analyzing the load prediction result.
2. The load prediction method based on K-means clustering and convolutional neural network model of claim 1, wherein: the pre-treatment process comprises the following steps of,
collecting actual measurement data of the power load of each power consumer in 2019-2021 every hour, and recording weather characteristic data and holiday characteristic data of the area;
filling missing values, processing abnormal values and normalizing the data of the acquired data;
for data of the numerical type, the calculation of the data normalization process includes,
Figure FDA0004037532740000011
wherein x represents the sample data collected, x min Representing the minimum value, x, in the acquired sample data max Representing the maximum value in the acquired sample data.
3. The load prediction method based on K-means clustering and convolutional neural network model as claimed in any one of claims 1 to 2, characterized in that: the clustering process includes the steps of,
randomly selecting k sample points from the preprocessed data sample set as the centers of all clusters, and calculating the distance between the point in each sample set and the center point of the k samples;
according to the calculation of the distance, distributing the points in each sample set to the sample cluster with the minimum distance from the points, and calculating the centroid of each cluster after re-division again;
calculating the distance between each sample point and the updated centroid of each sample, and repeating the steps in an analogical manner until the centroid of each sample cluster is not changed;
the calculation of the main optimization objectives of the K-means algorithm includes,
Figure FDA0004037532740000012
wherein K represents the number of clusters to be divided designated in advance, C i Represents the calculated centroid of each cluster, x represents the sample point in each cluster, dist (C) i And x) represents a distance from the center point of the ith cluster.
4. The load prediction method based on K-means clustering and convolutional neural network model of claim 3, wherein: the decomposition of the VMD algorithm includes,
decomposing the preprocessed power load sequence data into different modal components by the VMD algorithm, changing a constraint problem into a non-constraint problem by utilizing a secondary penalty and a Lagrange multiplier, and solving the non-constraint problem by using an alternating direction multiplier method;
obtaining all the modes of signal decomposition through iterative updating, and respectively modeling, predicting and reconstructing a plurality of obtained mode component subsequences;
the calculation of the problem includes that,
Figure FDA0004037532740000021
Figure FDA0004037532740000022
wherein u is k Representing the decomposed k modal components, w k The center frequency of the kth decomposed signal quantity is represented, t represents the time,
Figure FDA0004037532740000024
represents differentiating the time t, δ (t) represents a unit impact function, j represents an imaginary unit, represents a convolution symbol, | · u | | non-calculation 2 And f (t) represents power load data at the time t after exception processing.
5. The load prediction method based on K-means clustering and convolutional neural network model of claim 4, wherein: the construction of the CNN convolutional neural network comprises,
inputting training sets in K modal components of the power load data subjected to preprocessing, K-means clustering processing and VMD (vector machine dimension) stabilization into the convolutional layer for feature extraction;
carrying out nonlinear mapping on the output of the convolution layer through a sigmoid activation function;
the calculation of the activation function includes that,
Figure FDA0004037532740000023
wherein h (x) represents the output of the activation function and x represents the input of the activation function;
inputting the output of the activation function into a pooling layer, and compressing the feature data by adopting a maximum pooling method under the condition of keeping the features of the feature data;
and performing weighting calculation on the compressed feature data through a full connection layer, stacking the convolution layer and the pooling layer, and integrating feature information and outputting the feature information to a dropout layer.
6. The load prediction method based on K-means clustering and convolutional neural network model of claim 5, wherein: the construction of the dropout layer includes,
when the input of the dropout layer is transmitted forwards, a regularization method is used, so that the activation values of the neurons stop working with a certain probability p, namely, part of the neurons are lost, and overfitting of a neural network is avoided.
7. The load prediction method based on K-means clustering and convolutional neural network model of claim 6, wherein: also comprises the following steps of (1) preparing,
introducing learning rate attenuation to judge whether to finish training in advance according to the analysis of the prediction result, changing the learning efficiency through reduce LROnPrateau by adopting a theory that the learning rate is gradually reduced along with the increase of the iteration time, and reducing the learning efficiency after finding that the loss value is not reduced or the acc value is not increased any more;
the problem that the calculation amount is increased and the consumed time is long due to the complex nature of the network of the LSTM is solved by introducing a code for finishing training in advance;
callbacks can determine the action to be performed at the time when the next epoch starts or ends, can directly call the interfaces in the Callbacks where "acc", "val _ acc", "loss" and "val _ loss" are set, and stop and continue to practice when the loss value on the training set is not in the reduced range.
8. The load prediction system based on the K-means clustering and the convolutional neural network model is characterized by comprising the following steps:
the data processing module is used for acquiring power load actual measurement data, preprocessing the data and clustering the preprocessed data based on a K-means clustering algorithm;
the network construction module is used for decomposing the clustered data by utilizing a VMD algorithm, constructing a CNN (convolutional neural network) according to the decomposed data and extracting power load characteristics and holiday load characteristics;
and the load prediction module is used for predicting the load of the data through the CNN convolutional neural network to obtain and analyze the load prediction result.
9. An apparatus, characterized in that the apparatus comprises,
a processor;
a memory for storing processor-executable instructions;
the processor is configured to invoke the memory-stored instructions to perform the method of any of claims 1-7.
10. A computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the method of any of claims 1 to 7.
CN202310009803.2A 2023-01-04 2023-01-04 Load prediction method based on K-means clustering and convolutional neural network model Pending CN115983477A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310009803.2A CN115983477A (en) 2023-01-04 2023-01-04 Load prediction method based on K-means clustering and convolutional neural network model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310009803.2A CN115983477A (en) 2023-01-04 2023-01-04 Load prediction method based on K-means clustering and convolutional neural network model

Publications (1)

Publication Number Publication Date
CN115983477A true CN115983477A (en) 2023-04-18

Family

ID=85975817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310009803.2A Pending CN115983477A (en) 2023-01-04 2023-01-04 Load prediction method based on K-means clustering and convolutional neural network model

Country Status (1)

Country Link
CN (1) CN115983477A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116432874A (en) * 2023-06-14 2023-07-14 青岛鼎信通讯科技有限公司 Distributed photovoltaic power prediction method based on characteristic power

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116432874A (en) * 2023-06-14 2023-07-14 青岛鼎信通讯科技有限公司 Distributed photovoltaic power prediction method based on characteristic power

Similar Documents

Publication Publication Date Title
CN109587713B (en) Network index prediction method and device based on ARIMA model and storage medium
CN107992976B (en) Hot topic early development trend prediction system and prediction method
CN112434848B (en) Nonlinear weighted combination wind power prediction method based on deep belief network
CN109544399B (en) Power transmission equipment state evaluation method and device based on multi-source heterogeneous data
CN110059845B (en) Metering device clock error trend prediction method based on time sequence evolution gene model
CN110570030A (en) Wind power cluster power interval prediction method and system based on deep learning
CN110297469B (en) Production line fault judgment method based on resampling integrated feature selection algorithm
CN111241755A (en) Power load prediction method
CN108446714B (en) Method for predicting residual life of non-Markov degradation system under multiple working conditions
CN117078048B (en) Digital twinning-based intelligent city resource management method and system
CN112115643B (en) Smart train service life non-invasive prediction method
CN115983477A (en) Load prediction method based on K-means clustering and convolutional neural network model
CN116702612A (en) CVT health state prediction method and system based on multidimensional index fusion
CN115630726A (en) Roof photovoltaic power prediction method based on VMD-BILSTM neural network fusion attention mechanism
CN116933946A (en) Rail transit OD passenger flow prediction method and system based on passenger flow destination structure
CN114897248A (en) Power grid load prediction method based on artificial intelligence
CN116691418B (en) Charging method capable of automatically distributing control power
CN116050601A (en) Load prediction method based on variational modal decomposition and long-term and short-term memory mixed model
CN116561569A (en) Industrial power load identification method based on EO feature selection and AdaBoost algorithm
CN110852370A (en) Clustering algorithm-based large-industry user segmentation method
CN116258269A (en) Ultra-short-term load dynamic prediction method based on load characteristic decomposition
CN116126807A (en) Log analysis method and related device
CN115907461A (en) Electric power engineering method based on mechanism derivation equation
CN115688982A (en) Building photovoltaic data completion method based on WGAN and whale optimization algorithm
CN114037138A (en) Subway short-time arrival passenger flow prediction system based on double-layer decomposition and deep learning and implementation method

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