CN115470987A - Short-term photovoltaic power generation prediction method based on improved long-term and short-term memory neural network - Google Patents

Short-term photovoltaic power generation prediction method based on improved long-term and short-term memory neural network Download PDF

Info

Publication number
CN115470987A
CN115470987A CN202211116184.9A CN202211116184A CN115470987A CN 115470987 A CN115470987 A CN 115470987A CN 202211116184 A CN202211116184 A CN 202211116184A CN 115470987 A CN115470987 A CN 115470987A
Authority
CN
China
Prior art keywords
short
term
neural network
long
memory neural
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211116184.9A
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.)
Electric Power Research Institute of Guangxi Power Grid Co Ltd
Original Assignee
Electric Power Research Institute of Guangxi Power Grid 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 Electric Power Research Institute of Guangxi Power Grid Co Ltd filed Critical Electric Power Research Institute of Guangxi Power Grid Co Ltd
Priority to CN202211116184.9A priority Critical patent/CN115470987A/en
Publication of CN115470987A publication Critical patent/CN115470987A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • 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
    • 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/004Generation forecast, e.g. methods or systems for forecasting future energy generation
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J2300/00Systems for supplying or distributing electric power characterised by decentralized, dispersed, or local generation
    • H02J2300/20The dispersed energy generation being of renewable origin
    • H02J2300/22The renewable source being solar energy
    • 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)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Health & Medical Sciences (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Public Health (AREA)
  • Power Engineering (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Water Supply & Treatment (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Primary Health Care (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Development Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a short-term photovoltaic power generation prediction method based on an improved long-term and short-term memory neural network, which carries out data analysis on short-term photovoltaic power generation prediction required data to obtain a training data set; constructing a long-short term memory neural network, and inputting a training data set into the long-short term memory neural network for training; and optimizing the long-term and short-term memory neural network parameters by adopting a sparrow algorithm to obtain an optimized long-term and short-term memory neural network, and outputting a short-term photovoltaic power generation power predicted value by the optimized long-term and short-term memory neural network. Short-term photovoltaic power generation power prediction is carried out through historical multi-dimensional, multi-time scale and high-correlation data, so that the uncertainty of photovoltaic power generation in the power distribution network is relieved; and the long-term and short-term memory neural network parameters are optimized by adopting a sparrow algorithm, so that the prediction effect is further improved. By implementing the method, meteorological data can be well utilized, the prediction precision of short-term photovoltaic power can be improved, and the economical and stable operation of a power grid can be realized.

Description

Short-term photovoltaic power generation prediction method based on improved long-term and short-term memory neural network
Technical Field
The invention relates to the technical field of photovoltaic power prediction in the technical field of power grids, in particular to a short-term photovoltaic power generation prediction method based on an improved long-term and short-term memory neural network.
Background
With the promotion of environmental protection policies and the vigorous development of new energy technologies, distributed power sources are increasingly integrated into modern power distribution networks, so that the traditional power system gradually changes to a novel power system form. In the background of the gradual increase of the power generation permeability of the renewable energy sources, the voltage fluctuation may be caused or even out of limit due to the mismatch between the distributed power generation intermittency and the high impedance ratio of the power distribution network, and a greater technical challenge is brought to the voltage control and the economic operation of the power distribution network. The network reconstruction technology is an important means for supporting the optimized operation of the active power distribution network, and has important functions of improving voltage distribution, eliminating overload, reducing network loss, improving operation economy and the like.
Traditional voltage regulation equipment such as a capacitor bank, an on-load tap changer and the like belong to mechanical equipment, and the response speed is low. At present, a novel power system mainly uses power electronized reactive compensation equipment, which mainly comprises a static var generator (SVC), a static synchronous compensator (STATCOM) and the like. The static var generator is a device for performing dynamic reactive compensation through a power semiconductor bridge type converter with free phase change; the static synchronous compensator is a reactive power dynamic compensation device for generating and absorbing reactive power through a voltage source converter. SVC and STATCOM have relatively fast response speed, but the price is expensive, which prevents the wide application. In an active power distribution network, a distributed power supply such as a photovoltaic power supply and a fan can provide flexible and quick reactive support through control under normal operation conditions. Therefore, the distributed power supply can play a greater role in voltage control and network reconfiguration of the active power distribution network. The traditional voltage regulation and optimal scheduling method cannot fully consider the optimal scheduling potential of the distributed power supply, and ignores the randomness of distributed power supplies such as wind power generation and photovoltaic power generation and load fluctuation. Therefore, a short-term photovoltaic power generation prediction method based on an improved long-term and short-term memory neural network is needed.
Disclosure of Invention
The embodiment of the invention provides a short-term photovoltaic power generation prediction method based on an improved long-term and short-term memory neural network, which is used for at least solving the technical problem of uncertainty of photovoltaic power generation in a power grid in the related technology.
According to an aspect of the embodiments of the present invention, there is provided a short-term photovoltaic power generation prediction method based on an improved long-term and short-term memory neural network, including:
acquiring short-term photovoltaic power generation prediction required data, performing data analysis to obtain a training data set, and taking the training data set as input data of a long-term and short-term memory neural network;
constructing a long-short term memory neural network, and inputting the training data set into the long-short term memory neural network for training;
and optimizing the long-term and short-term memory neural network parameters by adopting a sparrow algorithm, setting the long-term and short-term memory neural network according to the optimized long-term and short-term memory neural network parameters to obtain the optimized long-term and short-term memory neural network, and outputting a short-term photovoltaic power generation power predicted value by the optimized long-term and short-term memory neural network.
Optionally, the obtaining of the training data set by performing data analysis on the historical photovoltaic power generation data includes:
collecting weather forecast data of a photovoltaic power station and each characteristic value of photovoltaic power generation, and forming a synchronous time sequence data set by the characteristic values;
performing data processing on the time series data set;
calculating the correlation between the meteorological data characteristic quantity and the photovoltaic power generation power in the time sequence data set based on a correlation analysis method;
selecting meteorological data characteristic quantity with high correlation and photovoltaic power generation power historical data to form input data of a photovoltaic power generation power short-term prediction model according to a correlation calculation result;
and dividing the input data into a training data set and a testing data set, and performing normalization processing.
Optionally, constructing the long-short term memory neural network comprises:
setting initial network parameters, wherein the initial network parameters comprise: network layer number, neuron number and learning rate;
setting a neural network according to the network parameters;
inputting the training data set into a neural network, and repeatedly and iteratively training the neural network;
and inputting the test data set into a long-term and short-term memory neural network to obtain a short-term photovoltaic power generation power predicted value, and analyzing the short-term photovoltaic power generation power predicted value with accuracy.
Optionally, the short-term photovoltaic power generation power predicted value is a 96-point short-term photovoltaic power generation power predicted value of the day to be predicted.
Optionally, the long-short term memory neural network parameters optimized by the sparrow algorithm include: the number of network layers, the number of neurons and the learning rate of the long-short term memory neural network.
Optionally, the optimizing the long-short term memory neural network parameters by using a sparrow algorithm includes:
initializing a population, wherein the population is a set of one parameter of a long-term and short-term memory neural network, the iteration times are carried out, and the proportion of predators and participants is initialized;
inputting the training data set and the test data set into a long-short term memory neural network for training to obtain a short-term photovoltaic power generation power predicted value, calculating a prediction error of the long-short term memory neural network, namely a fitness value, and sequencing;
updating the predator location;
updating the position of the joiner;
updating the position of the warner;
calculating a fitness value and updating the position of the sparrow;
and judging whether the stopping condition is met or not, if so, exiting, outputting a result, namely the optimal value of the long-term and short-term memory neural network parameters, and otherwise, repeatedly acquiring the fitness value.
Optionally, the expression of the predator position is:
Figure BDA0003845647030000031
in the above formula, the first and second carbon atoms are,
Figure BDA0003845647030000032
the position of the jth individual of the ith population in the tth generation of the population; alpha, R 2 A uniform random number from 0 to 1; q is a standard normal distribution random number; s. the T Is an alertness threshold; m is the maximum number of iterations.
According to another aspect of the embodiments of the present invention, there is also provided a short-term photovoltaic power generation prediction system based on an improved long-term and short-term memory neural network, including:
the data processing module is used for acquiring short-term photovoltaic power generation prediction required data, performing data analysis to obtain a training data set, and using the training data set as input data of the long-term and short-term memory neural network;
the long-short term memory neural network module is used for constructing a long-short term memory neural network and inputting the training data set into the long-short term memory neural network for training; and
and the sparrow algorithm optimization module is used for optimizing the long-short term memory neural network parameters by adopting a sparrow algorithm, setting the long-short term memory neural network according to the optimized long-short term memory neural network parameters to obtain the optimized long-short term memory neural network, and outputting the short-term photovoltaic power generation power predicted value by the optimized long-short term memory neural network.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, where the computer-readable storage medium includes a stored program, where the program is executed to control an apparatus where the computer-readable storage medium is located to perform any one of the above-mentioned short-term photovoltaic power generation prediction methods based on an improved long-short-term memory neural network.
According to another aspect of the embodiments of the present invention, there is also provided a processor for executing a program, where the program is executed to perform any one of the above short-term photovoltaic power generation prediction methods based on the improved long-short-term memory neural network.
Compared with the prior art, the invention has the following beneficial effects:
in the embodiment of the invention, the method obtains short-term photovoltaic power generation prediction required data, performs data analysis to obtain a training data set, and takes the training data set as input data of a long-term and short-term memory neural network; constructing a long-short term memory neural network, and inputting the training data set into the long-short term memory neural network for training; and optimizing the long-term and short-term memory neural network parameters by adopting a sparrow algorithm, setting the long-term and short-term memory neural network according to the optimized long-term and short-term memory neural network parameters to obtain the optimized long-term and short-term memory neural network, and outputting a short-term photovoltaic power generation power predicted value by the optimized long-term and short-term memory neural network. Short-term photovoltaic power generation power prediction is carried out through historical multi-dimensional, multi-time scale and high-correlation data, so that the uncertainty of photovoltaic power generation in a power distribution network is relieved; and the long-term and short-term memory neural network parameters are optimized by adopting a sparrow algorithm, so that the prediction effect is further improved. By implementing the method, meteorological data can be well utilized, the prediction precision of short-term photovoltaic power can be improved, and the economical and stable operation of a power grid can be realized. Furthermore, deep learning belongs to a data-driven method in machine learning, and generally uses a continuous multilayer structure in a neural network model to perform learning. The long-short term memory (LSTM) neural network belongs to one of the Recurrent Neural Networks (RNN), has both long-term and short-term memory functions, is used for processing time series problems, and has a good effect. Therefore, the LSTM neural network is selected for power distribution network load prediction and photovoltaic output prediction. The LSTM core design is characterized in that an input gate, a forgetting gate and an output gate are added, the memory state is controlled through the gate, and information of any time and distance is stored, so that the problems that the traditional recurrent neural network only has short-term memory and does not have long-term memory are solved, and the problems of gradient disappearance, gradient explosion and the like of the traditional recurrent neural network cannot occur.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only one embodiment of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a graphical illustration of a portion of historical data for photovoltaic power generation in accordance with an embodiment of the present invention;
FIG. 2 is a graphical illustration of LSTM short-term photovoltaic prediction results according to an embodiment of the present invention;
FIG. 3 is a graph of the absolute error of a sparrow algorithm optimized LSTM short-term photovoltaic power generation prediction, according to an embodiment of the invention;
FIG. 4 is a graphical illustration of the absolute error of comparing LSTM and sparrow algorithms optimizing LSTM short term photovoltaic predictions in accordance with an embodiment of the present invention;
FIG. 5 is a schematic illustration comparing photovoltaic power generation test data, LSTM and sparrow algorithm optimized LSTM short term photovoltaic prediction data according to an embodiment of the present invention;
fig. 6 is a flowchart of a short-term photovoltaic power generation prediction method based on an improved long-term and short-term memory neural network according to an embodiment of the present invention.
Detailed Description
It should be noted that, in the present application, the embodiments and features of the embodiments may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the accompanying drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
According to an embodiment of the present invention, there is provided an embodiment of a short-term photovoltaic power generation prediction method based on an improved long-term and short-term memory neural network, it is noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different from that herein.
Fig. 6 is a flowchart of a short-term photovoltaic power generation prediction method based on an improved long-term and short-term memory neural network according to an embodiment of the present invention, and as shown in fig. 6, the method includes the following steps:
s1, acquiring short-term photovoltaic power generation prediction required data, performing data analysis to obtain a training data set, and taking the training data set as input data of a long-term and short-term memory neural network;
as an alternative embodiment, the step of performing data analysis on the historical photovoltaic power generation power data to obtain a training data set includes the following steps:
s11, collecting weather forecast data of a photovoltaic power station and each characteristic value of photovoltaic power generation, and forming a synchronous time sequence data set by the characteristic values;
specifically, each characteristic value of the collected weather forecast data of the photovoltaic power station comprises air temperature, backboard temperature, radiation intensity, humidity, wind speed, air pressure and the like; collecting various characteristic values of photovoltaic power generation, including historical photovoltaic power generation power and the like of a photovoltaic power station; time series data set (X) forming synchronization 1 ,X 2 ,X 3 ,X 4 ,X 5 ,X 6 ,X 7 In which X 1 Representing air temperature data, X 2 Representing air temperature data, X 3 Representing radiation intensity data, X 4 Representing humidity data, X 5 Representing wind speed data, X 6 Representing barometric data, X 7 Representing photovoltaic historical generated power data.
S12, performing data processing on the time sequence data set; specifically, the magnitude of the photovoltaic power generation power load data is large, the training and calculation efficiency of the LSTM can be influenced, and meanwhile, the convergence rate of the algorithm is improved, so that the data are subjected to normalization processing.
Figure BDA0003845647030000071
In the above formula, the first and second carbon atoms are,
Figure BDA0003845647030000072
for the de-noised photovoltaic power generation data,
Figure BDA0003845647030000073
is the maximum value of the photovoltaic power generation data,
Figure BDA0003845647030000074
is the minimum value of the photovoltaic power generation data. .
S13, calculating the correlation between the meteorological data characteristic quantity and the photovoltaic power generation power in the time sequence data set based on a correlation analysis method;
and S14, selecting meteorological data characteristic quantities with high correlation according to the correlation calculation result, specifically, selecting indexes of the first 50% in the order from large to small according to the correlation coefficient, and forming input data of a photovoltaic power generation power short-term prediction model together with historical photovoltaic power generation power data.
And S15, dividing the input data into a training data set and a testing data set.
And S2, constructing a long-short term memory neural network, and inputting the training data set into the long-short term memory neural network for training.
As an alternative embodiment, constructing the long-short term memory neural network comprises the following steps:
step S21, setting initial network parameters, wherein the initial network parameters comprise: network layer number, neuron number and learning rate;
specifically, the dimensionality of the input data set after dimensionality reduction is used as the number of nodes of the input layer. The number of hidden layer nodes of the LSTM model is set to 20 and the number of ganglion nodes of the output layer of the prediction model is set to 4.
And S22, setting a neural network according to the network parameters, and repeatedly and iteratively training the neural network.
And S23, inputting the training data set into the neural network, and repeatedly and iteratively training the neural network.
S24, inputting the test data set into a long-term and short-term memory neural network to obtain a short-term photovoltaic power generation power predicted value, and analyzing the short-term photovoltaic power generation power predicted value to obtain the analysis precision;
specifically, the short-term photovoltaic power generation power predicted value is a 96-point short-term photovoltaic power generation power predicted value of the day to be predicted.
And S3, optimizing the long-term and short-term memory neural network parameters by adopting a sparrow algorithm, setting the long-term and short-term memory neural network according to the optimized long-term and short-term memory neural network parameters to obtain the optimized long-term and short-term memory neural network, and outputting a short-term photovoltaic power generation power predicted value by the optimized long-term and short-term memory neural network.
And the long-term and short-term memory neural network parameters are optimized by adopting a sparrow algorithm, so that the prediction effect is further improved. The sparrow algorithm is a group intelligent algorithm, the sparrow population is divided into predators, addicts and alertness, relevant fitness functions are constructed to calculate the fitness value of sparrows in order to simulate the foraging and anti-predation behaviors in the sparrow population, so that the role and position change among individuals is realized, and the problem that the traditional optimization algorithm is easy to fall into a local optimal solution is effectively avoided.
As an alternative embodiment, the optimization of the long-short term memory neural network parameters by using the sparrow algorithm comprises the following steps:
s31, initializing a population, wherein the population is a set of one parameter of a long-term and short-term memory neural network, the iteration times and the proportion of predators and participants are initialized;
the parameters of the long-term and short-term memory neural network optimized by adopting the sparrow algorithm comprise: the number of network layers, the number of neurons and the learning rate of the long-short term memory neural network.
And step S32, calculating the fitness value of the individual. And inputting the training data set and the test data set into a long-short term memory neural network for training to obtain a short-term photovoltaic power generation power predicted value, calculating a prediction error of the long-short term memory neural network, namely a fitness value, and sequencing.
S33, updating the position of the predator; predators with better fitness values can preferentially obtain food in the searching process, so that the predators are responsible for searching food for the whole sparrow population and providing a feeding direction.
Specifically, the expression of the predator position is:
Figure BDA0003845647030000081
in the above-mentioned formula, the compound has the following structure,
Figure BDA0003845647030000082
the position of the jth individual of the ith population in the tth generation of the population; alpha, R 2 A uniform random number from 0 to 1; q is a standard normal distribution random number; s T Is an alertness threshold; m is the maximum number of iterations.
Step S34, updating the position of the joiner; during foraging, the enrollee will constantly monitor the finder. Once they perceive that the finder has found better food, they will immediately leave their current location to compete for food. If they win, they can immediately obtain the finder's food.
Specifically, the mathematical expression for updating the subscriber location is as follows:
Figure BDA0003845647030000091
in the above formula, the first and second carbon atoms are,
Figure BDA0003845647030000092
is the worst position of the ith population in the t generation of the population;
Figure BDA0003845647030000093
the optimal position of the ith population in the t generation of the population is obtained; q is a standard normal distribution random number; d is a variable dimension; k is a uniform random number from-1 to 1.
Step S35, updating the position of the alerter; sparrows are randomly assigned cautionary people who are responsible for foraging the guard population. The initial position of these sparrows was randomly generated in the population, setting the number of cautioners to 20% of the total number.
Specifically, the mathematical expression for updating the position of the alert person is as follows:
Figure BDA0003845647030000094
in the above formula, the first and second carbon atoms are,
Figure BDA0003845647030000095
is the worst position of the ith population in the t generation of the population,
Figure BDA0003845647030000096
f is the optimal position of the ith population in the t generation of the population b Fitness of the best individual of the ith population in the t generation of the population, f j Is the ith population in the t generation of the populationFitness of individual j, Q is a standard normally distributed random number, epsilon is a minimum number, the prevented denominator is 0, k is a uniform random number from-1 to 1.
S36, calculating a fitness value and updating the position of the sparrow;
and S37, judging whether the stopping condition is met, if so, exiting, outputting a result, namely the optimal value of the long-short term memory neural network parameter, otherwise, repeatedly acquiring the fitness value, namely returning to the step S32, and repeating the step S32-237 from a new cycle.
According to one embodiment, the invention is verified by using a part of samples shown in fig. 1, the result of the method is shown in fig. 2, the photovoltaic prediction data can approximately track the actual data, the relative error of the photovoltaic prediction is shown in fig. 3, which shows that the relative error of the photovoltaic prediction is within 5%, the short-term photovoltaic prediction error pair of the LSTM optimized by the flase algorithm is shown in fig. 4, so that the prediction error can be greatly reduced compared with the basic LSTM by optimizing the LSTM by the flase algorithm, and the short-term load prediction and actual data pair of the LSTM optimized by the LSTM and the flase algorithm is shown in fig. 5, so that the actual data can be tracked by optimizing the LSTM by the flase algorithm more than the basic LSTM.
Example 2
According to another aspect of the embodiments of the present invention, there is also provided a short-term photovoltaic power generation prediction method based on an improved long-term and short-term memory neural network, including: a data processing module, a long-short term memory neural network module and a sparrow algorithm optimizing module,
the data processing module is used for acquiring short-term photovoltaic power generation prediction required data, performing data analysis to obtain a training data set, and using the training data set as input data of the long-term and short-term memory neural network;
the long-short term memory neural network module is used for constructing a long-short term memory neural network and inputting the training data set into the long-short term memory neural network for training;
and the sparrow algorithm optimization module is used for optimizing the long-short term memory neural network parameters by adopting a sparrow algorithm, setting the long-short term memory neural network according to the optimized long-short term memory neural network parameters to obtain the optimized long-short term memory neural network, and outputting the short-term photovoltaic power generation power predicted value by the optimized long-short term memory neural network.
The present invention is not limited to the above embodiments, which are merely preferred embodiments of the present invention, and the present invention is not limited thereto, and any modifications, equivalents and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Embodiment 4, according to another aspect of the embodiments of the present invention, there is further provided a computer-readable storage medium, where the computer-readable storage medium includes a stored program, where when the program runs, the apparatus where the computer-readable storage medium is controlled to execute the method for predicting short-term photovoltaic power generation based on the improved long-short-term memory neural network according to any one of the foregoing.
Optionally, in this embodiment, the computer-readable storage medium may be located in any one of a group of computer terminals in a computer network, or in any one of a group of mobile terminals, and the computer-readable storage medium includes a stored program.
Optionally, the program when executed controls an apparatus in which the computer-readable storage medium is located to perform the following functions: acquiring short-term photovoltaic power generation prediction required data, performing data analysis to obtain a training data set, and taking the training data set as input data of a long-term and short-term memory neural network; constructing a long-short term memory neural network, and inputting the training data set into the long-short term memory neural network for training; and optimizing the long-term and short-term memory neural network parameters by adopting a sparrow algorithm, setting the long-term and short-term memory neural network according to the optimized long-term and short-term memory neural network parameters to obtain the optimized long-term and short-term memory neural network, and outputting a short-term photovoltaic power generation power predicted value by the optimized long-term and short-term memory neural network.
Example 5
According to another aspect of the embodiments of the present invention, there is also provided a processor for executing a program, wherein the program is executed to execute the short-term photovoltaic power generation prediction method based on the improved long-short term memory neural network.
An embodiment of the present invention provides an apparatus, which includes a processor, a memory, and a program stored in the memory and executable on the processor, wherein the processor implements steps of a short-term photovoltaic power generation prediction method based on an improved long-short-term memory neural network when executing the program.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described system embodiments are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some interfaces, and the indirect coupling or communication connection between the units or modules may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is substantially or partly contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-0nlyMemory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. The short-term photovoltaic power generation prediction method based on the improved long-term and short-term memory neural network is characterized by comprising the following steps of:
acquiring short-term photovoltaic power generation prediction required data, performing data analysis to obtain a training data set, and taking the training data set as input data of a long-term and short-term memory neural network;
constructing a long-short term memory neural network, and inputting the training data set into the long-short term memory neural network for training;
and optimizing long-term and short-term memory neural network parameters by adopting a sparrow algorithm, setting the long-term and short-term memory neural network according to the optimized long-term and short-term memory neural network parameters to obtain the optimized long-term and short-term memory neural network, and outputting a short-term photovoltaic power generation power predicted value by the optimized long-term and short-term memory neural network.
2. The improved long-short term memory neural network-based short term photovoltaic power generation prediction method as claimed in claim 1, wherein performing data analysis on historical photovoltaic power generation power data to obtain a training data set comprises:
collecting weather forecast data of a photovoltaic power station and each characteristic value of photovoltaic power generation, and forming a synchronous time sequence data set by the characteristic values;
performing data processing on the time series data set;
calculating the correlation between the meteorological data characteristic quantity and the photovoltaic power generation power in the time sequence data set based on a correlation analysis method;
selecting meteorological data characteristic quantity with high correlation and photovoltaic power generation power historical data to form input data of a photovoltaic power generation power short-term prediction model according to a correlation calculation result;
and dividing the input data into a training data set and a testing data set, and performing normalization processing.
3. The method for predicting short-term photovoltaic power generation based on the improved long-short term memory neural network as claimed in claim 1, wherein constructing the long-short term memory neural network comprises:
setting initial network parameters, wherein the initial network parameters comprise: network layer number, neuron number and learning rate;
setting a neural network according to the network parameters;
inputting the training data set into a neural network, and repeatedly and iteratively training the neural network;
and inputting the test data set into a long-term and short-term memory neural network to obtain a short-term photovoltaic power generation power predicted value, and analyzing the short-term photovoltaic power generation power predicted value with accuracy.
4. The improved long-short term memory neural network-based short-term photovoltaic power generation prediction method as claimed in claim 3, wherein the short-term photovoltaic power generation power prediction value is a 96-point short-term photovoltaic power generation power prediction value of a day to be predicted.
5. The method for predicting short-term photovoltaic power generation based on the improved long-short term memory neural network as claimed in claim 1, wherein the parameters of the long-short term memory neural network optimized by using a sparrow algorithm comprise: the number of network layers, the number of neurons and the learning rate of the long-short term memory neural network.
6. The method for predicting short-term photovoltaic power generation based on the improved long-short term memory neural network as claimed in claim 1, wherein the optimization of the long-short term memory neural network parameters by using a sparrow algorithm comprises:
initializing a population, wherein the population is a set of one parameter of a long-term and short-term memory neural network, the iteration times are carried out, and the proportion of predators and participants is initialized;
inputting the training data set and the test data set into a long-short term memory neural network for training to obtain a short-term photovoltaic power generation power predicted value, calculating a prediction error of the long-short term memory neural network, namely a fitness value, and sequencing;
updating the predator location;
updating the position of the joiner;
updating the position of the warner;
calculating a fitness value and updating the position of the sparrow;
and judging whether the stopping condition is met or not, if so, exiting, outputting a result, namely the optimal value of the long-term and short-term memory neural network parameters, and otherwise, repeatedly acquiring the fitness value.
7. The method of claim 6, wherein the expression of the predator location is:
Figure FDA0003845647020000021
in the above formula, the first and second carbon atoms are,
Figure FDA0003845647020000022
the position of the jth individual of the ith population in the tth generation of the population; alpha, R 2 A uniform random number from 0 to 1; q is a standard normal distribution random number; s. the T Is an alertness threshold; m is the maximum number of iterations.
8. Short-term photovoltaic power generation prediction system based on improved long-term and short-term memory neural network is characterized by comprising the following components:
the data processing module is used for acquiring short-term photovoltaic power generation prediction required data, performing data analysis to obtain a training data set, and using the training data set as input data of the long-term and short-term memory neural network;
the long-short term memory neural network module is used for constructing a long-short term memory neural network and inputting the training data set into the long-short term memory neural network for training; and
and the sparrow algorithm optimization module is used for optimizing the long-short term memory neural network parameters by adopting a sparrow algorithm, setting the long-short term memory neural network according to the optimized long-short term memory neural network parameters to obtain the optimized long-short term memory neural network, and outputting the short-term photovoltaic power generation power predicted value by the optimized long-short term memory neural network.
9. A computer-readable storage medium, comprising a stored program, wherein when the program is executed, the computer-readable storage medium is controlled to implement a short-term photovoltaic power generation prediction method based on an improved long-short-term memory neural network according to any one of claims 1 to 7.
10. A processor configured to run a program, wherein the program is configured to execute the method for predicting short-term photovoltaic power generation based on the modified long-short-term memory neural network of any one of claims 1 to 7 when running.
CN202211116184.9A 2022-09-14 2022-09-14 Short-term photovoltaic power generation prediction method based on improved long-term and short-term memory neural network Pending CN115470987A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211116184.9A CN115470987A (en) 2022-09-14 2022-09-14 Short-term photovoltaic power generation prediction method based on improved long-term and short-term memory neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211116184.9A CN115470987A (en) 2022-09-14 2022-09-14 Short-term photovoltaic power generation prediction method based on improved long-term and short-term memory neural network

Publications (1)

Publication Number Publication Date
CN115470987A true CN115470987A (en) 2022-12-13

Family

ID=84334055

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211116184.9A Pending CN115470987A (en) 2022-09-14 2022-09-14 Short-term photovoltaic power generation prediction method based on improved long-term and short-term memory neural network

Country Status (1)

Country Link
CN (1) CN115470987A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116227743A (en) * 2023-05-06 2023-06-06 中国华能集团清洁能源技术研究院有限公司 Photovoltaic power generation power abnormal rate determining method and system based on tuna swarm algorithm
CN116307299A (en) * 2023-05-23 2023-06-23 国网天津市电力公司营销服务中心 Photovoltaic power generation power short-term prediction method, system, equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116227743A (en) * 2023-05-06 2023-06-06 中国华能集团清洁能源技术研究院有限公司 Photovoltaic power generation power abnormal rate determining method and system based on tuna swarm algorithm
CN116227743B (en) * 2023-05-06 2023-09-01 中国华能集团清洁能源技术研究院有限公司 Photovoltaic power generation power abnormal rate determining method and system based on tuna swarm algorithm
CN116307299A (en) * 2023-05-23 2023-06-23 国网天津市电力公司营销服务中心 Photovoltaic power generation power short-term prediction method, system, equipment and storage medium

Similar Documents

Publication Publication Date Title
Afrasiabi et al. Multi-agent microgrid energy management based on deep learning forecaster
Wang et al. A hybrid wind power forecasting approach based on Bayesian model averaging and ensemble learning
Jiang et al. Scenario generation for wind power using improved generative adversarial networks
Wang et al. Toward the prediction level of situation awareness for electric power systems using CNN-LSTM network
Ghadimi et al. PSO based fuzzy stochastic long-term model for deployment of distributed energy resources in distribution systems with several objectives
CN115470987A (en) Short-term photovoltaic power generation prediction method based on improved long-term and short-term memory neural network
Wenzhi et al. Hierarchical energy optimization management of active distribution network with multi-microgrid system
Sönmez Estimation of fuel cost curve parameters for thermal power plants using the ABC algorithm
Han et al. Short-term forecasting of individual residential load based on deep learning and K-means clustering
Tavassoli-Hojati et al. A self-partitioning local neuro fuzzy model for short-term load forecasting in smart grids
Li et al. Maximum frequency deviation assessment with clustering based on metric learning
Semero et al. An accurate very short-term electric load forecasting model with binary genetic algorithm based feature selection for microgrid applications
Galvani et al. Data clustering based probabilistic optimal power flow in power systems
Deb et al. Modified spider monkey optimization-based optimal placement of distributed generators in radial distribution system for voltage security improvement
Moradifar et al. Comprehensive identification of multiple harmonic sources using fuzzy logic and adjusted probabilistic neural network
CN109214546A (en) A kind of Power Short-Term Load Forecasting method based on improved HS-NARX neural network
Babu et al. Optimal integration of different types of DGs in radial distribution system by using Harris hawk optimization algorithm
Huang et al. Adaptive static equivalences for active distribution networks with massive renewable energy integration: a distributed deep reinforcement learning approach
Manuel et al. PALONN: Parallel ant lion optimizer and artificial neural network for power flow control of the micro grid-connected system
Liu et al. An optimized short-term wind power interval prediction method considering NWP accuracy
Shen et al. Short-term load forecasting of power system based on similar day method and PSO-DBN
Chen et al. Optimal reactive power dispatch and distributed generation placement based on a hybrid co‐evolution algorithm and bi‐level programming
Talayero et al. Machine Learning models for the estimation of the production of large utility-scale photovoltaic plants
Nguyen et al. Optimal soft open point placement and open switch position selection simultaneously for power loss reduction on the electric distribution network
Saini et al. Optimal power flow analysis including stochastic renewable energy sources using modified ant lion optimization algorithm

Legal Events

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