CN117394350A - Short-term power load prediction method, device, equipment and medium - Google Patents

Short-term power load prediction method, device, equipment and medium Download PDF

Info

Publication number
CN117394350A
CN117394350A CN202311507302.3A CN202311507302A CN117394350A CN 117394350 A CN117394350 A CN 117394350A CN 202311507302 A CN202311507302 A CN 202311507302A CN 117394350 A CN117394350 A CN 117394350A
Authority
CN
China
Prior art keywords
power load
module
load prediction
prediction
bilstm
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
CN202311507302.3A
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.)
Ningxia University
Original Assignee
Ningxia University
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 Ningxia University filed Critical Ningxia University
Priority to CN202311507302.3A priority Critical patent/CN117394350A/en
Publication of CN117394350A publication Critical patent/CN117394350A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J3/00Circuit arrangements for ac mains or ac distribution networks
    • H02J3/003Load forecast, e.g. methods or systems for forecasting future load demand
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • 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/044Recurrent networks, e.g. Hopfield networks
    • G06N3/0442Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/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
    • 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

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

Abstract

The present disclosure provides a short-term power load prediction method, comprising: constructing a power load prediction model, wherein the power load prediction model comprises a CNN feature extraction module and a BiLSTM sequence prediction module, the CNN feature extraction module is used for extracting power load features included in historical power load data, and the BiLSTM sequence prediction module is used for bi-directionally mining time sequence features of the power load features to obtain a power load prediction output value; optimizing the super parameters in the CNN feature extraction module and the BiLSTM sequence prediction module by adopting a gray wolf optimization algorithm to obtain an optimized power load prediction model; and inputting the historical power load data in the short-term preset period into the optimized power load prediction model to obtain short-term power load prediction data.

Description

Short-term power load prediction method, device, equipment and medium
Technical Field
The disclosure relates to the technical field of power information technology, and in particular relates to a short-term power load prediction method, a short-term power load prediction device, electronic equipment and a medium.
Background
The electric power energy is a pillar energy source in the modern society, the load prediction is a basis for guaranteeing the electric power supply and demand balance, and is a research hot spot in the electric power information field all the time, and the electric power energy is directly related to the demand scheduling of an electric power system.
The commonly used load prediction method is mainly divided into a traditional method and a modern method. The traditional prediction method is based on a statistical principle, and is simple to use and high in running speed. The power load prediction is a complex process, and only a single data set is used in the prediction, so that influence factors are not considered, and the prediction error is larger, and the prediction precision is lower. The modern prediction method is mainly an artificial intelligent learning method represented by a neural network, and comprises an artificial neural network, a random forest, a support vector machine, wavelet transformation and the like. Compared with the traditional method, the modern prediction method not only improves the prediction precision, but also has stronger adaptability. The artificial intelligence learning method has strong nonlinear fitting, data analysis and prediction capabilities, and meets the requirement of mass load data processing of the power system.
In recent years, the super learning ability and self-adaptive ability of deep learning make it a focus of the field of load prediction. A Convolutional Neural Network (CNN) is one type of forward neural network. Compared with the traditional fully-connected neural network, the complexity of the CNN model is greatly reduced. However, because of the long-span dependency in the sequence information, the forward neural network is difficult to model effectively. Cyclic neural networks (Recursive Neural Network, RNN), which have been widely used over decades of derivative changes. Compared with the traditional neural network, the RNN structure has self-connection, so that a large amount of information can be obtained, and further, a more complex mapping relation can be learned. A Long Short-Term Memory (LSTM) network is an improved network of RNNs, which effectively solves the problem of gradient extinction and gradient explosion of the latter, so that information can be stored for a Long time. Based on LSTM, a two-way long and short term Memory (BiLSTM) network was derived. BiLSTM extends on LSTM, can both memorize longer information and consider history information, and can lead the network to learn future information in advance, which is very beneficial to predicting problems.
Disclosure of Invention
In view of the above problems, the invention provides a short-term power load prediction method, a short-term power load prediction device, an electronic device and a medium, so as to solve the problem that the power load prediction precision is not high.
One aspect of the present disclosure provides a short-term power load prediction method comprising: constructing a power load prediction model, wherein the power load prediction model comprises a CNN feature extraction module and a BiLSTM sequence prediction module, the CNN feature extraction module is used for extracting power load features included in historical power load data, and the BiLSTM sequence prediction module is used for bi-directionally mining time sequence features of the power load features to obtain a power load prediction output value; optimizing the super parameters in the CNN feature extraction module and the BiLSTM sequence prediction module by adopting a gray wolf optimization algorithm to obtain an optimized power load prediction model; and inputting the historical power load data in a short-term preset period into the optimized power load prediction model to obtain short-term power load prediction data.
According to an embodiment of the present disclosure, before performing the method, the method further comprises: and preprocessing the historical power load data, wherein the preprocessing at least comprises outlier inspection, missing value complementation, normalization processing and dimension reduction processing.
According to an embodiment of the present disclosure, in the CNN feature extraction module, extracting the power load features included in the historical power load data includes: inputting the historical power load data into an image input layer of the CNN feature extraction module to obtain image features; and performing multi-time rolling and pooling operation on the image characteristics, and performing dimension compression through a flat layer of the CNN characteristic extraction module to obtain the power load characteristics.
According to an embodiment of the disclosure, in the BiLSTM sequence prediction module, bi-directionally mining the timing characteristics of the power load characteristics, obtaining a power load prediction output value includes: inputting the power load characteristics into a forward LSTM and a reverse LSTM of the BiLSTM sequence prediction module respectively to perform power load prediction; and fusing the power load prediction results of the forward LSTM and the reverse LSTM to obtain the power load prediction output value.
According to an embodiment of the disclosure, the optimizing the hyper-parameters in the CNN feature extraction module and the BiLSTM sequence prediction module by using a wolf optimization algorithm, to obtain an optimized power load prediction model includes: initializing a wolf population, wherein the position of the wolf represents the super parameter; applying the position of the wolf to the CNN feature extraction module and the BiLSTM sequence prediction module to obtain the power load prediction output value; calculating a loss function based on the electrical load predicted output value and actual electrical load data; screening three wolves with the minimum loss function, and calculating an objective function value based on the three wolves; calculating a new position of the wolf based on the objective function value, and updating the wolf population; repeating the steps until reaching the termination condition to obtain the optimal super parameter; and applying the super parameters to the CNN feature extraction module and the BiLSTM sequence prediction module to obtain the optimized power load prediction model.
According to an embodiment of the disclosure, the calculation formula for calculating the objective function value based on the three wolves is:
D=|C*X α,β,δ -X|;
wherein D represents the objective function value, C represents the weights of the three gray wolves, X α,β,δ Representing a combination of the positions of the three wolves, X represents the position of one of the wolves in the population.
According to an embodiment of the disclosure, the calculating a new position of the wolf based on the objective function value updates a calculation formula of the wolf group as follows:
X new =X α,β,δ -A*D;
wherein X is new Representing the position of the new gray wolf, X α,β,δ Representing a combination of the positions of the three wolves, A representing the weight of the objective function value, and D representing the objective function value.
A second aspect of the present disclosure provides a short-term power load prediction apparatus, comprising: the model construction module is used for constructing a power load prediction model, the power load prediction model comprises a CNN feature extraction module and a BiLSTM sequence prediction module, the CNN feature extraction module is used for extracting power load features included in historical power load data, and the BiLSTM sequence prediction module is used for bi-directionally mining time sequence features of the power load features to obtain a power load prediction output value; the parameter optimization module is used for optimizing the super parameters in the CNN characteristic extraction module and the BiLSTM sequence prediction module by adopting a gray wolf optimization algorithm to obtain an optimized power load prediction model; and the model application module is used for inputting the historical power load data in the short-term preset period into the optimized power load prediction model to obtain short-term power load prediction data.
A third aspect of the present disclosure provides an electronic device, comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the short-term power load prediction method of any one of the first aspects when the computer program is executed.
A fourth aspect of the present disclosure provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of any one of the short-term power load prediction methods of the first aspect.
The above at least one technical scheme adopted in the embodiment of the disclosure can achieve the following beneficial effects:
the power load prediction model based on the CNN-BiLSTM combined neural network is designed by comprehensively utilizing the characteristic expression capacity of CNN and the capacity of BiLSTM processing time sequence relation. CNN is mainly used for extracting space features, so that time sequence features cannot be effectively extracted, biLSTM can extract time sequence features bidirectionally, and more useful information can be obtained. CNN-BiLSTM formed by combining CNN and BiLSTM can make best use of the advantages and avoid the disadvantages, and fully plays roles of the two models in different fields. In addition, the disclosure proposes a method for solving the problem that model super-parameters are trapped in local optimum to cause non-ideal prediction precision by adopting a gray wolf optimization algorithm (GWO). In the process, the gray wolf optimization algorithm can optimize parameters such as the number of neurons in an hidden layer, the iteration times, the learning rate and the like, and finally a GWO-CNN-BiLSTM neural network comprehensive prediction model is built so as to improve the power load prediction precision.
Drawings
For a more complete understanding of the present disclosure and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which:
FIG. 1 schematically illustrates a flow chart of a short-term power load prediction method provided by an embodiment of the present disclosure;
FIG. 2 schematically illustrates a step schematic of a short-term power load prediction method provided by an embodiment of the present disclosure;
FIG. 3 schematically illustrates a schematic structure of a BiLSTM neural network according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flowchart of a gray wolf algorithm provided by an embodiment of the present disclosure;
FIG. 5 schematically illustrates a block diagram of a short-term power load prediction apparatus provided by an embodiment of the present disclosure;
fig. 6 schematically illustrates a block diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Some of the block diagrams and/or flowchart illustrations are shown in the figures. It will be understood that some blocks of the block diagrams and/or flowchart illustrations, or combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the instructions, when executed by the processor, create means for implementing the functions/acts specified in the block diagrams and/or flowchart.
Thus, the techniques of this disclosure may be implemented in hardware and/or software (including firmware, microcode, etc.). Additionally, the techniques of this disclosure may take the form of a computer program product on a computer-readable medium having instructions stored thereon, the computer program product being usable by or in connection with an instruction execution system. In the context of this disclosure, a computer-readable medium may be any medium that can contain, store, communicate, propagate, or transport the instructions. For example, a computer-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or propagation medium. Specific examples of the computer readable medium include: magnetic storage devices such as magnetic tape or hard disk (HDD); optical storage devices such as compact discs (CD-ROMs); a memory, such as a Random Access Memory (RAM) or a flash memory; and/or a wired/wireless communication link.
Fig. 1 schematically illustrates a flowchart of a short-term power load prediction method provided by an embodiment of the present disclosure.
As shown in fig. 1, an embodiment of the present disclosure provides a short-term power load prediction method including S110 to S130.
S110, constructing a power load prediction model, wherein the power load prediction model comprises a CNN feature extraction module and a BiLSTM sequence prediction module, the CNN feature extraction module is used for extracting power load features included in historical power load data, and the BiLSTM sequence prediction module is used for bi-directionally exploring time sequence features of the power load features to obtain a power load prediction output value.
Electrical load prediction (Electrical Load Forecast, ELF) is typically a time series prediction problem that involves predicting an electrical load over a period of time in the future based on historical electrical load data and possibly related factors. As shown below, mathematical models are built to describe the characteristics and trends of historical load data in order to predict future load demands.
Lt=f(Xt,θ)+∈t;
Wherein: lt represents the predicted power load at time t, xt represents the input feature vector at time t, such as historical load data, weather information, holiday identification, etc., θ represents model parameters, f represents the prediction function used, and depending on the complexity of the problem, it may be a linear model, a neural network, a decision tree, an integration method, etc., and e t represents the prediction error at time t.
In this embodiment, a comprehensive prediction model based on GWO-CNN-BiLSTM neural network is established to improve short-term power load prediction accuracy, and if the comprehensive prediction model is made to approach a functional relationship existing between sample data, the model is:
and S120, optimizing the super parameters in the CNN characteristic extraction module and the BiLSTM sequence prediction module by adopting a gray wolf optimization algorithm to obtain an optimized power load prediction model.
In order to enable the power load prediction model to accurately predict, the super-parameter tuning is a key step. Before optimization, a hyper-parameter space of the CNN-BiLSTM model is defined, wherein the hyper-parameter space comprises super-parameters such as a learning rate, a batch processing size, a convolution kernel size, an LSTM layer number, an LSTM unit number, a Dropout rate and the like. Each super-parameter has a range or discrete value that will be the parameter searched by the wolf's optimization algorithm. The super-parameters are optimized through the gray wolf optimization algorithm, so that the problem that prediction accuracy is not ideal due to the fact that the super-parameters of the model are trapped in local optimization can be well solved.
And S130, inputting the historical power load data in the short-term preset period into an optimized power load prediction model to obtain short-term power load prediction data.
And when the optimized power load prediction model is obtained, verifying the effectiveness of the model by using a test set, determining the defects by analyzing the load prediction result, continuously optimizing the prediction model, and finally applying the model to the power load actual data prediction.
Fig. 2 schematically illustrates a step diagram of a short-term power load prediction method provided by an embodiment of the present disclosure. The detailed steps of one short-term power load prediction method provided by the present disclosure will be described below in conjunction with fig. 2.
First, data for model training needs to be prepared. First, historical power load data needs to be collected, which typically includes power usage data every hour or every 15 minutes. In addition, it is desirable to collect relevant environmental and meteorological data such as temperature, humidity, wind speed, etc., as these factors can affect the electrical load. And then preprocessing the historical power load data, wherein the preprocessing at least comprises outlier inspection, missing value completion, normalization processing and dimension reduction processing, which is an important step for ensuring the accuracy of the subsequent model. In addition, features for prediction may be selected, constructed, and created from the processed historical power load data. And finally, dividing the data into a training set, a verification set and a test set for standby.
And secondly, constructing a CNN feature extraction module. In the CNN feature extraction module, extracting the power load features included in the historical power load data includes: inputting the historical power load data into an image input layer of a CNN feature extraction module to obtain image features; and performing multi-time rolling and pooling operation on the image features, and performing dimension compression on the image features through a flat layer of the CNN feature extraction module to obtain power load features. The power load characteristics may include information such as time trends, seasonal variations, etc. as inputs to the BiLSTM sequence prediction module.
The operation of the convolutional layer of the CNN feature extraction module can be expressed as:
O j =∑iI i *W ij +b j
where i is the input, W is the weight, b is the offset, x represents the convolution operation, and j is the feature map index of the output.
And thirdly, constructing a BiLSTM sequence prediction module. In the BiLSTM sequence prediction module, bi-directionally mining a temporal characteristic of a power load characteristic, obtaining a power load prediction output value includes: respectively inputting the power load characteristics into a forward LSTM and a reverse LSTM of the BiLSTM sequence prediction module to perform power load prediction; and fusing the power load prediction results of the forward LSTM and the reverse LSTM to obtain a power load prediction output value.
Fig. 3 schematically illustrates a structural schematic diagram of a BiLSTM neural network provided in an embodiment of the present disclosure.
As shown in fig. 3, the BiLSTM is to add a reverse LSTM to the forward LSTM, process the data from the back to the front, and then combine the outputs of the two. X is x 1 ,x 2 ,x 3 ,…,x t Representing t 1 ~t i (i∈[1~t]) Input data corresponding to each moment, A 1 ,A 2 ,A 3 ,…,A t B (B) 1 ,B 2 ,B 3 ,…,B t Representing the LSTM hidden states of the respective forward and backward iterations, Y 1 ,Y 2 ,Y 3 ,…,Y t Representing a predicted output value, ω, of the electrical load at time step t 1 ,ω 2 ,ω 3 ,…,ω 6 Representing the corresponding weights of the layers. The past input sequences x1 to xt are learned by the bi-directional LSTM model while utilizing the forward and reverse hidden states A1, A2, A3, …, at and B1, B2, B3, …, bt information to generate a predicted value of the power load At the current time t.
The hidden layer update states of the forward LSTM and the backward LSTM and the BiLSTM final output procedure are as follows.
A i =f 11 x i2 A i-1 );
B i =f 23 x i5 B i+1 );
Y i =f 34 A i6 B i );
Wherein f 1 、f 2 、f 3 Respectively, are activation functions between different layers.
And fourthly, optimizing the super parameters in the CNN characteristic extraction module and the BiLSTM sequence prediction module by adopting a gray wolf optimization algorithm. The super parameters include super parameters such as learning rate, batch processing size, convolution kernel size, LSTM layer number, LSTM unit number, dropout rate, etc.
Fig. 4 schematically shows a flowchart of a wolf algorithm provided by an embodiment of the present disclosure.
As shown in FIG. 4, optimizing the super parameters using the gray wolf optimization algorithm includes S401-S407.
S401, initializing a wolf group and the position X of the wolves i Representing the super parameter.
S402, applying the position of the wolf to the CNN feature extraction module and the BiLSTM sequence prediction module to obtain a power load prediction output value.
S403, calculating a loss function, namely a fitness value, based on the power load predicted output value and the actual power load data. Common evaluation metrics include Mean Square Error (MSE), root Mean Square Error (RMSE), mean Absolute Error (MAE), and the like. In this embodiment, the loss function uses a mean square error.
For each gray wolf position, a loss function (mean square error) is calculated:
forward propagation computes the predicted outcome:this value represents a predicted value for the power load value at point in time i.
Calculating the mean square error:
wherein y is i An accurate value for the power load value at point in time i is represented.
S404, screening three wolves with the smallest loss function, and calculating an objective function value based on the three wolves. The calculation formula for calculating the objective function value based on the three wolves is as follows:
D=|C*X α,β,δ -X|;
wherein D represents an objective function value, C represents weights of three wolves, and X α,β,δ Representing a combination of the positions of three wolves, X represents the position of one wolf in the population of wolves.
S405, calculating the position of a new wolf based on the objective function value, and updating the wolf population.
The calculation formula for updating the gray wolf population is as follows:
X new =X α,β,δ -A*D;
wherein X is new Representing the position of a new gray wolf, X α,β,δ The combination of the positions of three wolves is represented, A represents the weight of the objective function value, and D represents the objective function value.
A=2a*r 1 -a;
C=2*r 2
Wherein r is 1 And r 2 A is a random number of 0-1, a represents a convergence factor, and a represents a weight of D as the number of iterations increases and decreases linearly from 2 to 0。
S406, repeating the steps until the termination condition is reached, and obtaining the optimal super parameter. The termination condition may be the maximum number of iterations reached by the iteration or other termination condition.
S407, applying the super parameters to the CNN feature extraction module and the BiLSTM sequence prediction module to obtain an optimized power load prediction model.
Before training the model, the data is divided into a training set, a verification set and a test set. During model training, a training set is used for training the model, a verification set is used for adjusting model parameters, and after model optimization, the prediction performance of the model is evaluated on a test set.
After model training and evaluation are completed, the model can be deployed into an actual power system for load prediction result feedback adjustment: and adjusting model parameters or reselecting the model according to the actual performance of the prediction result. The power load prediction model needs to be continuously monitored and updated to accommodate new data and changes.
According to the short-term power load prediction method provided by the embodiment of the disclosure, a CNN-BiLSTM fusion model is established, the two essences can be taken to fully capture the time sequence characteristics and the space characteristics, and compared with single CNN or BiLSTM, the prediction precision is greatly improved. On the basis, the model super-parameters are optimized by GWO, fewer parameters are set through a gray wolf optimization algorithm to conduct global search, the optimal super-parameter combination is found, the model precision can be further improved, and the prediction precision of short-term power load is met.
Fig. 5 schematically illustrates a block diagram of a short-term power load prediction apparatus provided by an embodiment of the present disclosure.
As shown in fig. 5, an embodiment of the present disclosure provides a short-term power load prediction apparatus 500, comprising: a model construction module 510, a parameter optimization module 520, and a model application module 530.
The model construction module 510 is configured to construct a power load prediction model, where the power load prediction model includes a CNN feature extraction module and a BiLSTM sequence prediction module, the CNN feature extraction module is configured to extract a power load feature included in the historical power load data, and the BiLSTM sequence prediction module is configured to bi-directionally discover a time sequence feature of the power load feature, so as to obtain a power load prediction output value. In one embodiment of the present disclosure, the model building module 510 is used to implement S210 of the short-term power load prediction method as shown in fig. 1-4.
The parameter optimization module 520 is configured to optimize the super parameters in the CNN feature extraction module and the BiLSTM sequence prediction module by using a wolf optimization algorithm, so as to obtain an optimized power load prediction model. In one embodiment of the present disclosure, the model building module 510 is used to implement S220 of the short-term power load prediction method as shown in fig. 1-4.
The model application module 530 is configured to input the historical power load data in the short-term preset period into the optimized power load prediction model, and obtain short-term power load prediction data. In one embodiment of the present disclosure, the model building module 510 is configured to implement S230 of the short-term power load prediction method as shown in fig. 1-4.
It is understood that the model building module 510, the parameter optimization module 520, and the modulo application module 530 may be combined and implemented in one module, or any one of the modules may be split into a plurality of modules. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. At least one of the model building module 510, the parameter optimization module 520, and the model application module 530 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or any other reasonable way of integrating or packaging circuitry, or the like, hardware or firmware, or any suitable combination of the three implementations of software, hardware, and firmware, in accordance with embodiments of the present invention. Alternatively, at least one of the model construction module 510, the parameter optimization module 520, and the model application module 530 may be at least partially implemented as computer program modules that, when executed by a computer, perform the functions of the respective modules.
Fig. 6 schematically illustrates a block diagram of an electronic device according to an embodiment of the disclosure.
As shown in fig. 6, the electronic device described in the present embodiment includes: the electronic device 600 includes a processor 610, a computer-readable storage medium 620. The electronic device 600 may perform the method described above with reference to fig. 1 to enable detection of a particular operation.
In particular, the processor 610 may include, for example, a general purpose microprocessor, an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 610 may also include on-board memory for caching purposes. The processor 610 may be a single processing unit or a plurality of processing units for performing different actions in accordance with the method flow described with reference to fig. 1.
The computer-readable storage medium 620 may be, for example, any medium that can contain, store, communicate, propagate, or transport the instructions. For example, a readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or propagation medium. Specific examples of the readable storage medium include: magnetic storage devices such as magnetic tape or hard disk (HDD); optical storage devices such as compact discs (CD-ROMs); a memory, such as a Random Access Memory (RAM) or a flash memory; and/or a wired/wireless communication link.
The computer-readable storage medium 620 may include a computer program 621, which computer program 621 may include code/computer-executable instructions that, when executed by the processor 610, cause the processor 610 to perform the method flow as described above in connection with fig. 1 and any variations thereof.
The computer program 621 may be configured with computer program code comprising, for example, computer program modules. For example, in an example embodiment, code in computer program 621 may include one or more program modules, including 621A, modules 621B, … …, for example. It should be noted that the division and number of modules is not fixed, and that a person skilled in the art may use suitable program modules or combinations of program modules according to the actual situation, which when executed by the processor 610, enable the processor 610 to perform, for example, the method flows and any variations thereof described above in connection with fig. 1-2.
At least one of the model construction module 510, the parameter optimization module 520, and the model application module 530 may be implemented as computer program modules described with reference to fig. 6, which when executed by the processor 610, may implement the respective operations described above, in accordance with embodiments of the invention.
The present disclosure also provides a computer-readable medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer readable medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
While the present disclosure has been shown and described with reference to certain exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present disclosure as defined by the appended claims and their equivalents. The scope of the disclosure should, therefore, not be limited to the above-described embodiments, but should be determined not only by the following claims, but also by the equivalents of the following claims.

Claims (10)

1. A short-term power load prediction method, comprising:
constructing a power load prediction model, wherein the power load prediction model comprises a CNN feature extraction module and a BiLSTM sequence prediction module, the CNN feature extraction module is used for extracting power load features included in historical power load data, and the BiLSTM sequence prediction module is used for bi-directionally mining time sequence features of the power load features to obtain a power load prediction output value;
optimizing the super parameters in the CNN feature extraction module and the BiLSTM sequence prediction module by adopting a gray wolf optimization algorithm to obtain an optimized power load prediction model;
and inputting the historical power load data in a short-term preset period into the optimized power load prediction model to obtain short-term power load prediction data.
2. The method of claim 1, wherein prior to performing the method, the method further comprises:
and preprocessing the historical power load data, wherein the preprocessing at least comprises outlier inspection, missing value complementation, normalization processing and dimension reduction processing.
3. The method of claim 1, wherein in the CNN feature extraction module, extracting power load features included in historical power load data comprises:
inputting the historical power load data into an image input layer of the CNN feature extraction module to obtain image features;
and performing multi-time rolling and pooling operation on the image characteristics, and performing dimension compression through a flat layer of the CNN characteristic extraction module to obtain the power load characteristics.
4. The method of claim 1, wherein bi-directionally mining the temporal characteristics of the power load characteristics in the BiLSTM sequence prediction module to obtain power load prediction output values comprises:
inputting the power load characteristics into a forward LSTM and a reverse LSTM of the BiLSTM sequence prediction module respectively to perform power load prediction;
and fusing the power load prediction results of the forward LSTM and the reverse LSTM to obtain the power load prediction output value.
5. The method of claim 1, wherein optimizing the hyper-parameters in the CNN feature extraction module and the BiLSTM sequence prediction module using a gray wolf optimization algorithm to obtain an optimized power load prediction model comprises:
initializing a wolf population, wherein the position of the wolf represents the super parameter;
applying the position of the wolf to the CNN feature extraction module and the BiLSTM sequence prediction module to obtain the power load prediction output value;
calculating a loss function based on the electrical load predicted output value and actual electrical load data;
screening three wolves with the minimum loss function, and calculating an objective function value based on the three wolves;
calculating a new position of the wolf based on the objective function value, and updating the wolf population;
repeating the steps until reaching the termination condition to obtain the optimal super parameter;
and applying the super parameters to the CNN feature extraction module and the BiLSTM sequence prediction module to obtain the optimized power load prediction model.
6. The method of claim 5, wherein the calculation formula for calculating the objective function value based on the three wolves is:
D=|C*X α,β,δ -X|;
wherein D represents the objective function value, C represents the weights of the three gray wolves, X α,β,δ Representing a combination of the positions of the three wolves, X represents the position of one of the wolves in the population.
7. The method of claim 5, wherein the calculating new positions of the wolves based on the objective function values updates the calculation formula of the wolf population as:
X new =X α,β,δ -A*D;
wherein X is new Representing the position of the new gray wolf, X α,β,δ Representing a combination of the positions of the three wolves, A representing the weight of the objective function value, and D representing the objective function value.
8. A short-term power load prediction apparatus, comprising:
the model construction module is used for constructing a power load prediction model, the power load prediction model comprises a CNN feature extraction module and a BiLSTM sequence prediction module, the CNN feature extraction module is used for extracting power load features included in historical power load data, and the BiLSTM sequence prediction module is used for bi-directionally mining time sequence features of the power load features to obtain a power load prediction output value;
the parameter optimization module is used for optimizing the super parameters in the CNN characteristic extraction module and the BiLSTM sequence prediction module by adopting a gray wolf optimization algorithm to obtain an optimized power load prediction model;
and the model application module is used for inputting the historical power load data in the short-term preset period into the optimized power load prediction model to obtain short-term power load prediction data.
9. An electronic device, comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the short-term power load prediction method according to any one of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the short-term power load prediction method of any of claims 1 to 7.
CN202311507302.3A 2023-11-13 2023-11-13 Short-term power load prediction method, device, equipment and medium Pending CN117394350A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311507302.3A CN117394350A (en) 2023-11-13 2023-11-13 Short-term power load prediction method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311507302.3A CN117394350A (en) 2023-11-13 2023-11-13 Short-term power load prediction method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN117394350A true CN117394350A (en) 2024-01-12

Family

ID=89440917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311507302.3A Pending CN117394350A (en) 2023-11-13 2023-11-13 Short-term power load prediction method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN117394350A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117875365A (en) * 2024-01-22 2024-04-12 兰州理工大学 Short-term power load prediction method based on SMBO-BiGRU-Attention

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117875365A (en) * 2024-01-22 2024-04-12 兰州理工大学 Short-term power load prediction method based on SMBO-BiGRU-Attention

Similar Documents

Publication Publication Date Title
CN117394350A (en) Short-term power load prediction method, device, equipment and medium
CN115347571B (en) Photovoltaic power generation short-term prediction method and device based on transfer learning
CN111723910A (en) Method and device for constructing multi-task learning model, electronic equipment and storage medium
Massaoudi et al. Performance evaluation of deep recurrent neural networks architectures: Application to PV power forecasting
Dong et al. Short-term building cooling load prediction model based on DwdAdam-ILSTM algorithm: A case study of a commercial building
CN116108742A (en) Low-voltage transformer area ultra-short-term load prediction method and system based on improved GRU-NP model
Guo et al. Applying gated recurrent units pproaches for workload prediction
CN113591957B (en) Wind power output short-term rolling prediction and correction method based on LSTM and Markov chain
CN117172355A (en) Sea surface temperature prediction method integrating space-time granularity context neural network
CN116722541A (en) Power system load prediction method and device based on convolutional neural network
CN113610665B (en) Wind power generation power prediction method based on multi-delay output echo state network
CN116303786A (en) Block chain financial big data management system based on multidimensional data fusion algorithm
CN115616333A (en) Power distribution network line loss prediction method and system
CN115293406A (en) Photovoltaic power generation power prediction method based on Catboost and Radam-LSTM
CN115759343A (en) E-LSTM-based user electric quantity prediction method and device
CN115860165A (en) Neural network basin rainfall runoff forecasting method and system considering initial loss
Liu et al. Wind power prediction based on LSTM-CNN optimization
Qian et al. Short-term Load Forecasting Based on Multi-model Fusion of CNN-LSTM-LGBM
CN115222024B (en) Short-term photovoltaic power generation prediction method and system based on depth feature selection network
Gaber et al. Hourly electricity price prediction applying deep learning for electricity market management
CN112183814A (en) Short-term wind speed prediction method
CN113821974B (en) Engine residual life prediction method based on multiple fault modes
Wang Electricity load model forecasting research based on WOABiLSTM-Attention algorithm
CN113988415B (en) Medium-and-long-term power load prediction method
Chen MmSN: Accurate Short-term Load Forecasting via a Multi-module Structural Network Based on Multi-feature Fusion

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