CN116070758A - Photovoltaic power generation short-term power prediction method, device and storage medium - Google Patents

Photovoltaic power generation short-term power prediction method, device and storage medium Download PDF

Info

Publication number
CN116070758A
CN116070758A CN202310088214.8A CN202310088214A CN116070758A CN 116070758 A CN116070758 A CN 116070758A CN 202310088214 A CN202310088214 A CN 202310088214A CN 116070758 A CN116070758 A CN 116070758A
Authority
CN
China
Prior art keywords
day
value
predicted
longicorn
photovoltaic power
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
CN202310088214.8A
Other languages
Chinese (zh)
Inventor
蔡新雷
孟子杰
喻振帆
王乃啸
林旭
祝锦舟
刘佳乐
李超
侯珏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Power Grid Co Ltd
Electric Power Dispatch Control Center of Guangdong Power Grid Co Ltd
Original Assignee
Guangdong Power Grid Co Ltd
Electric Power Dispatch Control Center of Guangdong 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 Guangdong Power Grid Co Ltd, Electric Power Dispatch Control Center of Guangdong Power Grid Co Ltd filed Critical Guangdong Power Grid Co Ltd
Priority to CN202310088214.8A priority Critical patent/CN116070758A/en
Publication of CN116070758A publication Critical patent/CN116070758A/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/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/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
    • 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)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Economics (AREA)
  • Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • General Business, Economics & Management (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Evolutionary Computation (AREA)
  • Tourism & Hospitality (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Primary Health Care (AREA)
  • Development Economics (AREA)
  • Water Supply & Treatment (AREA)
  • Public Health (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Photovoltaic Devices (AREA)

Abstract

The invention discloses a photovoltaic power generation short-term power prediction method, a device and a storage medium, wherein the method comprises the following steps: calculating the comprehensive similarity value of the day to be predicted and each historical day, and obtaining the actual photovoltaic power value of the historical day with the highest comprehensive similarity value; constructing an adaptability function according to the actual value of the photovoltaic power; updating the initial longicorn group position according to the fitness function and the self-adaptive step length; calculating respective weights and thresholds of output-implicit, implicit-accepting and implicit-output of the Elman neural network so that the Elman neural network outputs a predicted value; calculating an fitness function value of the updated longicorn group position according to the predicted value; when the fitness function value meets the iteration termination condition, taking the current weight and the threshold value as optimal parameters, so that the Elman neural network performs power prediction according to the optimal parameters; the accuracy of photovoltaic power generation short-term power prediction is improved, and the reliability and stability of operation of the power system are enhanced.

Description

Photovoltaic power generation short-term power prediction method, device and storage medium
Technical Field
The invention relates to the technical field of power systems, in particular to a photovoltaic power generation short-term power prediction method, a photovoltaic power generation short-term power prediction device and a storage medium.
Background
The photovoltaic power generation gradually becomes a main form of new energy power generation due to the advantages of no pollution, huge energy reserve, high power generation efficiency and the like, the annual growth rate of the photovoltaic power generation breaks through 40%, and the photovoltaic power generation becomes the new energy with the fastest global growth speed and the most extensive energy utilization field.
Meanwhile, photovoltaic power generation is easily affected by weather factors such as solar radiance, and the new energy power generation treatment has the defects of randomness, volatility, instability and the like. More and more photovoltaic power generation systems are integrated into a power grid, so that the stability and the safety operation of the power system are adversely affected, and the scheduling complexity of the power system is increased. Therefore, the method improves the short-term power prediction precision of the photovoltaic power generation, and has important significance for realizing accurate scheduling of the power system, complementation of various energy sources and safe and reliable operation of the power system. The Elman neural network prediction method is gradually applied to photovoltaic power generation prediction, and the conventional Elman neural network has the defect of poor generalization performance, and has poor internal network structure performance and poor prediction precision of photovoltaic power generation.
Disclosure of Invention
The invention provides a photovoltaic power generation short-term power prediction method, a device and a storage medium, which optimize an Elman neural network internal structure by using a longicorn group search algorithm, predict photovoltaic power generation short-term power by using the optimized Elman neural network, improve the accuracy of photovoltaic power generation short-term power prediction, and enhance the reliability and stability of power system operation.
In order to achieve the purpose of improving the accuracy of photovoltaic power generation short-term power prediction, the embodiment of the invention provides a photovoltaic power generation short-term power prediction method, which comprises the following steps: obtaining weather influence factors of a day to be predicted and a plurality of history days, calculating comprehensive similarity values of the day to be predicted and each history day, and obtaining a photovoltaic power actual value of a first history day with the highest comprehensive similarity value with the day to be predicted;
constructing an adaptability function according to the photovoltaic power output value of the day to be predicted and the photovoltaic power actual value of the first historical day; determining the position of an initial longicorn group according to weather influence factors of the day to be predicted, optimizing the initial longicorn group according to the fitness function and the self-adaptive step length, and updating the position of the initial longicorn group;
calculating respective weights and thresholds of output-implicit, implicit-accepting and implicit-output of the Elman neural network according to the current self-adaptive step length and the current longicorn group position, so that the Elman neural network outputs a predicted value according to the current ownership weights and thresholds; calculating a first fitness function value of the updated longicorn group position according to the predicted value;
when the first fitness function value meets an iteration termination condition, taking the current three weights and the current three thresholds as optimal parameters, so that the Elman neural network performs power prediction according to the optimal parameters; the iteration termination condition is greater than a preset value and maintained at a constant value.
According to the method, as a preferred scheme, the comprehensive similarity value of a day to be predicted and each historical day is calculated, the photovoltaic power actual value of a first historical day with the highest comprehensive similarity value with the day to be predicted is obtained, the photovoltaic power actual value of the first historical day with the highest comprehensive similarity value is utilized to construct an adaptability function, the adaptability function takes the comprehensive similarity as a core, the output-hidden, hidden-accepting and hidden-output weight and threshold of the Elman neural network are determined by using a self-adaptive longicorn group search algorithm on the basis, parameters of the Elman neural network are optimized, the Elman neural network optimized by the longicorn group search algorithm has a more accurate photovoltaic power generation short-term power prediction effect, photovoltaic power generation short-term power prediction precision is improved, and a direct prediction process is more convenient; for the power grid, accurate short-term power generation prediction provides a data basis for power grid dispatching, saves a large amount of electric energy, improves the economical type of operation of the power system, and ensures that the operation of the power system is more stable and safer.
As a preferable scheme, weather influence factors of a day to be predicted and a plurality of history days are obtained, and comprehensive similarity values of the day to be predicted and each history day are calculated, specifically:
According to weather influence factors of a day to be predicted and a plurality of historical days, a first influence factor matrix of the day to be predicted and a second influence factor matrix of the historical days are constructed, and the first influence factor matrix and the second influence factor matrix are subtracted to obtain a distance matrix; adding the elements of the distance matrix to obtain distance similarity values of a day to be predicted and a plurality of history days;
mapping the numerical values of each row of the first influence factor matrix and the second influence factor matrix into a three-dimensional space respectively to obtain a first trend matrix of a day to be predicted and a second trend matrix of a history day; the numerical values of each row of the first influence factor matrix and the second influence factor matrix are respectively characteristic vectors of a plurality of weather factors of each day;
calculating angle cosine values of vectors corresponding to the first trend matrix and the second trend matrix, projecting the angle cosine values into the interval of [0,1], and superposing the angle cosine values at each moment to obtain a trend similarity value;
and calculating the comprehensive similarity according to the distance similarity value and the trend similarity value.
As a preferred scheme, the invention designs calculation of the trend similarity value and the distance similarity value, and the comprehensive similarity of the trend similarity value and the distance similarity value considers the comprehensive similarity of the day to be predicted and each historical day, and is used for selecting the photovoltaic power actual value of the first historical day with the highest comprehensive similarity value of the selected similar day and the day to be predicted; the calculation accuracy of the similarity between the trend similarity value and the distance similarity value can be improved, the obtained photovoltaic power actual value of the first historical day has more similar accuracy with the photovoltaic power actual value of the first historical day, the obtained photovoltaic power actual value of the first historical day participates in the calculation of the fitness function, and the fitness function is utilized to optimize the internal structure of the Elman neural network, so that the photovoltaic power generation short-term power prediction accuracy is improved.
As a preferred scheme, according to the photovoltaic power output value of the day to be predicted and the photovoltaic power actual value of the first historical day, an fitness function is constructed, specifically:
Figure SMS_1
α=P t+1,e -P t,e
β=P t+1,o -P t,o
wherein f is a fitness function, P t+1,e And P t,e The actual photovoltaic power value P of the first historical day at the t+1 time and the t time t+1,o And P t,o And the output value is the output value of the solar photovoltaic power to be predicted at the t+1 time and the t time.
According to the method, the photovoltaic power actual value of the first historical day with the highest similarity value with the day to be predicted is used for participating in calculation of the fitness function, and the fitness function is used for optimizing the internal structure of the Elman neural network, so that the photovoltaic power generation short-term power prediction accuracy is improved.
Preferably, before determining the initial longicorn group position according to the weather influence factor of the day to be predicted, the method further comprises:
determining the self-adaptive step length of a Tianniu group search algorithm:
μ n =-arctan[a(n+b)]+c;
wherein mu n For the self-adaptive step length, n is the iteration number, and step length parameters a, b and c are preset parameter values;
initializing a longicorn group search direction:
Figure SMS_2
in the method, in the process of the invention,
Figure SMS_3
represents the searching direction of the kth longhorn beetle, K is 1,2,3 and … K; k is the longicorn population scale; rand represents a random function; g represents a spatial dimension;
selecting random numbers between [ -1,1] as an initial solution set of a siren group searching algorithm and an initial position of a siren group;
Calculating a second fitness function value of the initial position of the longicorn according to the self-adaptive step length;
calculating the left whisker position and the right whisker position of the initial Tian Niu group:
Figure SMS_4
wherein x is r k And x l k Respectively representing the left whisker position and the right whisker position of the kth longhorn beetle, wherein n is the current iteration number and x n k Represents the position of the kth longicorn at the nth iteration, d n k For the distance between the longhorn beetle whisker and the longhorn beetle position at the nth iteration of the kth longhorn beetle, the calculation formula is as follows:
d n =η a d n-1 +d 0
wherein eta is a d is a distance attenuation factor between the longhorn beetle beards and the longhorn beetle positions, d 0 Is the initial distance.
As a preferred scheme, the method optimizes the output-implicit, implicit-accepting and implicit-output weights and thresholds of the Elman neural network by applying the longhorn beetle group search algorithm on the basis of the fitness function, and firstly initializes the longhorn beetle group search algorithm, so that the short-term power prediction of the photovoltaic power generation is more accurate and the direct prediction process is more convenient by using the Elman neural network model optimized by the longhorn beetle group search algorithm.
As a preferred scheme, determining an initial longicorn group position according to weather influence factors of a day to be predicted, optimizing the initial longicorn group according to the fitness function and the self-adaptive step length, and updating the initial longicorn group position, specifically:
And taking the characteristic vector of the nth weather factor of the day to be predicted as the left and right whisker positions of the kth longhorn beetle, and updating the longhorn beetle group positions, wherein the characteristic vector is expressed as follows:
Figure SMS_5
wherein f is a fitness function, sign is a sign function, μ n For the adaptive step size of the nth iteration, f (x r ) And f (x) l ) The fitness function values of the left and right beards of the longicorn group are respectively.
According to the method, as a preferred scheme, the longhorn beetle group search algorithm is applied to optimize the output-implicit, implicit-accepting and implicit-output weights and thresholds of the Elman neural network on the basis of the fitness function, the characteristic vector of the nth weather factor of the day to be predicted is used as the left and right whisker positions of the kth longhorn beetle, the initial longhorn beetle group is optimized according to the fitness function and the self-adaptive step length, the initial longhorn beetle group position is updated, and the Elman neural network model optimized by the longhorn beetle group search algorithm enables photovoltaic power generation short-term power prediction to be more accurate and direct prediction process to be more convenient.
As a preferred scheme, according to the current self-adaptive step length and the current longhorn beetle group position, calculating respective weights and thresholds of output-implicit, implicit-accepting and implicit-output of the Elman neural network, specifically:
calculation of Elm Output of an neural network-implicit weight Q 1 And a threshold w 1 Implicit-accepted weight Q 2 And a threshold w 2 And implicit-output weight Q 3 And a threshold w 3 :
Figure SMS_6
/>
Figure SMS_7
Wherein eta is a step attenuation factor and x n k Mu, the current position of the longicorn group n Is the adaptive step size of the nth iteration.
As a preferred scheme, the adaptive longhorn beetle group search algorithm is used for determining the output-hidden, hidden-accepting and hidden-output weights and thresholds of the Elman neural network, parameters of the Elman neural network are optimized by updating the longhorn beetle group position and then updating the weights and thresholds, the Elman neural network optimized by the longhorn beetle group search algorithm has a more accurate photovoltaic power generation short-term power prediction effect, photovoltaic power generation short-term power prediction precision is improved, and a direct prediction process is more convenient.
Preferably, when the first fitness function value meets an iteration termination condition, the method further includes:
if the first fitness function value does not meet the iteration termination condition, updating the self-adaption step length:
μ n =η as μ n-10
μ n adaptive step size, μ for the nth iteration n-1 Adaptive step size, eta, for the n-1 th iteration as To search for step attenuation factor, μ 0 The initial searching step length is set;
according to the updated self-adaptive step length, optimizing the initial Tianniu group again;
The iteration termination condition is that the first fitness function value is greater than the second fitness function value and is maintained at a constant value.
As a preferred scheme, the method is based on a step length updating strategy fed back by an optimizing result, and in a certain iteration process, if a longicorn group searches for a better fitness function value, namely that an optimal solution is found, the longicorn position is only required to be updated, and the step length is not required to be updated; if the fitness function value searched by the longicorn group does not meet the iteration termination condition, the situation that a better solution is not found is indicated, the current searching step length is considered to be too large, and the step length needs to be corrected; until the longicorn group searches for a better fitness function value, the parameters of the Elman neural network are optimized through the current longicorn group position updating weight and the threshold value, the Elman neural network optimized through the longicorn group searching algorithm of the step length updating strategy fed back by the optimizing result has a more accurate photovoltaic power generation short-term power prediction effect, photovoltaic power generation short-term power prediction precision is improved, and the direct prediction process is more convenient.
Correspondingly, the invention also provides a photovoltaic power generation short-term power prediction device, which comprises: the system comprises an acquisition module, an updating module and a prediction module;
The acquisition module is used for acquiring weather influence factors of a day to be predicted and a plurality of history days, calculating comprehensive similarity values of the day to be predicted and each history day, and acquiring a photovoltaic power actual value of a first history day with the highest comprehensive similarity value with the day to be predicted;
the updating module is used for constructing an adaptability function according to the photovoltaic power output value of the day to be predicted and the photovoltaic power actual value of the first historical day; determining the position of an initial longicorn group according to weather influence factors of the day to be predicted, optimizing the initial longicorn group according to the fitness function and the self-adaptive step length, and updating the position of the initial longicorn group;
calculating respective weights and thresholds of output-implicit, implicit-accepting and implicit-output of the Elman neural network according to the current self-adaptive step length and the current longicorn group position, so that the Elman neural network outputs a predicted value according to the current ownership weights and thresholds; calculating a first fitness function value of the updated longicorn group position according to the predicted value;
the prediction module is used for taking the current three weights and the current three thresholds as optimal parameters when the first fitness function value meets an iteration termination condition, so that the Elman neural network performs power prediction according to the optimal parameters; the iteration termination condition is greater than a preset value and maintained at a constant value.
As a preferred scheme, the acquisition module acquires the photovoltaic power actual value of the first historical day with the highest comprehensive similarity value with the day to be predicted by calculating the day to be predicted and the comprehensive similarity value of each historical day, and constructs an adaptability function by utilizing the photovoltaic power actual value of the first historical day with the highest comprehensive similarity value, wherein the adaptability function takes the comprehensive similarity as a core, the updating module determines the output-hidden, hidden-accepting and hidden-output weight and threshold value of the Elman neural network by using the self-adaptive longicorn group search algorithm on the basis, the parameters of the Elman neural network are optimized, the prediction module predicts the photovoltaic power short-term power by using the optimized parameters of the Elman neural network, and the Elman neural network optimized by the longicorn group search algorithm has a more accurate photovoltaic power prediction effect, improves the photovoltaic power short-term prediction precision, and is more convenient in the direct prediction process; for the power grid, accurate short-term power generation prediction provides a data basis for power grid dispatching, saves a large amount of electric energy, improves the economical type of operation of the power system, and ensures that the operation of the power system is more stable and safer.
Preferably, the updating module includes: an initialization unit, an update unit and a calculation unit;
the initialization unit is used for determining the self-adaptive step length of the antenna group search algorithm:
μ n =-arctan[a(n+b)]+c;
wherein mu n For the self-adaptive step length, n is the iteration number, and step length parameters a, b and c are preset parameter values;
initializing a longicorn group search direction:
Figure SMS_8
in the method, in the process of the invention,
Figure SMS_9
represents the searching direction of the kth longhorn beetle, K is 1,2,3 and … K; k is the longicorn population scale;
rand represents a random function; g represents a spatial dimension;
selecting random numbers between [ -1,1] as an initial solution set of a siren group searching algorithm and an initial position of a siren group;
calculating a second fitness function value of the initial position of the longicorn according to the self-adaptive step length;
calculating the left whisker position and the right whisker position of the initial Tian Niu group:
Figure SMS_10
wherein x is r k And x l k Respectively representing the left whisker position and the right whisker position of the kth longhorn beetle, wherein n is the current iteration number and x n k Represents the position of the kth longicorn at the nth iteration, d n k For the distance between the longhorn beetle whisker and the longhorn beetle position at the nth iteration of the kth longhorn beetle, the calculation formula is as follows:
d n =η a d n-1 +d 0
wherein eta is a d is a distance attenuation factor between the longhorn beetle beards and the longhorn beetle positions, d 0 Is the initial distance.
The updating unit is used for updating the position of the longhorn beetle group by taking the characteristic vector of the nth weather factor of the day to be predicted as the left and right whisker positions of the kth longhorn beetle, and the characteristic vector is expressed as follows:
Figure SMS_11
Wherein f is a fitness function, sign is a sign function, μ n For the adaptive step size of the nth iteration, f (x r ) And f (x) l ) Adaptation of the right and left beard of the longicorn groupA degree function value;
the computing unit is used for computing the output-implicit weight Q of the Elman neural network 1 And a threshold w 1 Implicit-accepted weight Q 2 And a threshold w 2 And implicit-output weight Q 3 And a threshold w 3 :
Figure SMS_12
Figure SMS_13
Wherein eta is a step attenuation factor and x n k Mu, the current position of the longicorn group n Is the adaptive step size of the nth iteration.
According to the method, an output-implicit, implicit-accepting and implicit-output weight and threshold of the Elman neural network are optimized by applying the longicorn group search algorithm on the basis of the fitness function, an initialization unit firstly initializes the longicorn group search algorithm, an updating unit uses a characteristic vector of an nth weather factor of a day to be predicted as a left and right whisker position of a kth longicorn, the initial longicorn group is optimized according to the fitness function and the self-adaptive step length, the initial longicorn group position is updated, a calculation unit determines the output-implicit, implicit-accepting and implicit-output weight and threshold of the Elman neural network by using the self-adaptive longicorn group search algorithm, and parameters of the Elman neural network are optimized by updating the longicorn group position and then updating the weight and threshold.
Accordingly, the present invention also provides a computer-readable storage medium including a stored computer program; wherein the computer program, when running, controls the device where the computer readable storage medium is located to execute a photovoltaic power generation short-term power prediction method according to the present disclosure.
Drawings
FIG. 1 is a schematic flow chart of an embodiment of a photovoltaic power generation short-term power prediction method provided by the invention;
FIG. 2 is a schematic diagram of an embodiment of an adaptive longicorn group optimizing process of a photovoltaic power generation short-term power prediction method provided by the invention;
fig. 3 is a schematic structural diagram of an embodiment of a photovoltaic power generation short-term power prediction apparatus provided by the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Referring to fig. 1, a method for predicting short-term power of photovoltaic power generation according to an embodiment of the present invention includes steps S101 to S104:
step S101: obtaining weather influence factors of a day to be predicted and a plurality of history days, calculating comprehensive similarity values of the day to be predicted and each history day, and obtaining a photovoltaic power actual value of a first history day with the highest comprehensive similarity value with the day to be predicted;
in this embodiment, weather influence factors of a day to be predicted and a plurality of history days are obtained, and a comprehensive similarity value of the day to be predicted and each history day is calculated, specifically:
according to weather influence factors of a day to be predicted and a plurality of historical days, a first influence factor matrix of the day to be predicted and a second influence factor matrix of the historical days are constructed, and the first influence factor matrix and the second influence factor matrix are subtracted to obtain a distance matrix; adding the elements of the distance matrix to obtain distance similarity values of a day to be predicted and a plurality of history days;
mapping the numerical values of each row of the first influence factor matrix and the second influence factor matrix into a three-dimensional space respectively to obtain a first trend matrix of a day to be predicted and a second trend matrix of a history day; the numerical values of each row of the first influence factor matrix and the second influence factor matrix are respectively characteristic vectors of a plurality of weather factors of each day;
Calculating angle cosine values of vectors corresponding to the first trend matrix and the second trend matrix, projecting the angle cosine values into the interval of [0,1], and superposing the angle cosine values at each moment to obtain a trend similarity value;
and calculating the comprehensive similarity according to the distance similarity value and the trend similarity value.
And calculating comprehensive similarity according to the distance similarity value and the trend similarity value:
Figure SMS_14
wherein, gamma is the comprehensive similarity, gamma 1 For distance similarity value, gamma 2 Is a trend similarity value.
In this embodiment, according to weather influence factors of a day to be predicted and a plurality of history days, a first influence factor matrix of the day to be predicted and a second influence factor matrix of the history days are constructed, specifically:
photovoltaic power generation power data and meteorological data of current photovoltaic power station on historical days are obtained, and weather effect factor matrixes X of a plurality of historical days are constructed i
Figure SMS_15
Wherein X is i An influence factor matrix for the ith history day; x is x in (k) Normalized values of the kth sample of the nth class of weather data for the ith history day; n=1, 2,3, respectively solar radiation, ambient temperature and ambient humidity; k is the number of samples, k=1, 2,..m;
acquiring meteorological data of a current photovoltaic power station on a day to be predicted, and constructing a weather influence factor matrix of the day to be predicted:
X d =[x d1 x d2 x d3 ];
Wherein x is dn And the feature vector of the weather factors of the nth class of the day to be predicted. The weather effect factor matrix presented herein includes the ambient humidity, solar irradiance, and ambient temperature class 3 weather factor feature vectors.
Subtracting the first influence factor matrix from the second influence factor matrix to obtain a distance matrix x Taking the integral difference between the day to be predicted and the history day into consideration, adding the elements of the distance matrix to convert the integral distance difference into a similarity measure, and introducing the obtained added value into a negative exponential function to obtain the distance similarity gamma 1 The expression is as follows:
γ 1 =1/e υ
Figure SMS_16
mapping the numerical values of each row of the first influence factor matrix and the second influence factor matrix into a three-dimensional space respectively to obtain a first trend matrix of a day to be predicted and a second trend matrix of a history day, calculating angle cosine values of vectors corresponding to the first trend matrix and the second trend matrix, projecting the angle cosine values into the interval of [0,1], and finally superposing the angle cosine values at each moment to obtain trend similarity, wherein the trend similarity can be expressed as follows:
Figure SMS_17
/>
Figure SMS_18
wherein u is x Trend matrix for daily impact factor of history day, u ox Is a trend matrix of days to be predicted.
In the embodiment, calculation of a trend similarity value and a distance similarity value is designed, and comprehensive similarity of a day to be predicted and each history day is considered by the comprehensive trend similarity value and the distance similarity value, wherein the calculation is used for selecting a photovoltaic power actual value of a first history day with the highest comprehensive similarity value between the selection of the similarity day and the day to be predicted; the calculation accuracy of the similarity between the trend similarity value and the distance similarity value can be improved, the obtained photovoltaic power actual value of the first historical day has more similar accuracy with the photovoltaic power actual value of the first historical day, the obtained photovoltaic power actual value of the first historical day participates in the calculation of the fitness function, and the fitness function is utilized to optimize the internal structure of the Elman neural network, so that the photovoltaic power generation short-term power prediction accuracy is improved.
Step S102: constructing an adaptability function according to the photovoltaic power output value of the day to be predicted and the photovoltaic power actual value of the first historical day; determining the position of an initial longicorn group according to weather influence factors of the day to be predicted, optimizing the initial longicorn group according to the fitness function and the self-adaptive step length, and updating the position of the initial longicorn group;
in this embodiment, according to the photovoltaic power output value of the day to be predicted and the photovoltaic power actual value of the first historical day, an fitness function is constructed, specifically:
Figure SMS_19
α=P t+1,e -P t,e
β=P t+1,o -P t,o
wherein f is a fitness function, P t+1,e And P t,e The actual photovoltaic power value P of the first historical day at the t+1 time and the t time t+1,o And P t,o And the output value is the output value of the solar photovoltaic power to be predicted at the t+1 time and the t time.
In this embodiment, before determining the initial longicorn group position according to the weather effect factor of the day to be predicted, the method further includes:
determining the self-adaptive step length of a Tianniu group search algorithm:
μ n =-arctan[a(n+b)]+c;
wherein mu n For the self-adaptive step length, n is the iteration number, and step length parameters a, b and c are preset parameter values;
initializing a longicorn group search direction:
Figure SMS_20
in the method, in the process of the invention,
Figure SMS_21
represents the searching direction of the kth longhorn beetle, K is 1,2,3 and … K; k is the longicorn population scale; rand represents a random function; g represents a spatial dimension;
Selecting [ -1,1]The random number in between is used as the initial solution set of the Tianniu group searching algorithm and the initial position of the Tianniu group, and is stored in X best In (a) and (b);
calculating a second fitness function value of the initial position of the longicorn according to the self-adaptive step length, and storing the second fitness function value in Y best In (a) and (b);
calculating the left whisker position and the right whisker position of the initial Tian Niu group:
Figure SMS_22
wherein x is r k And x l k Respectively representing the left whisker position and the right whisker position of the kth longhorn beetle, wherein n is the current iteration number and x n k Represents the position of the kth longicorn at the nth iteration, d n k For the distance between the longhorn beetle whisker and the longhorn beetle position at the nth iteration of the kth longhorn beetle, the calculation formula is as follows:
d n =η a d n-1 +d 0
wherein eta is a d is a distance attenuation factor between the longhorn beetle beards and the longhorn beetle positions, d 0 Is the initial distance.
In this embodiment, the initial longicorn group position is determined according to the weather influence factor of the day to be predicted, and the initial longicorn group is optimized according to the fitness function and the adaptive step length, so as to update the initial longicorn group position, specifically:
and taking the characteristic vector of the nth weather factor of the day to be predicted as the left and right whisker positions of the kth longhorn beetle, and updating the longhorn beetle group positions, wherein the characteristic vector is expressed as follows:
Figure SMS_23
wherein f is a fitness function, sign is a sign function, μ n For the adaptive step size of the nth iteration, f (x r ) And f (x) l ) The fitness function values of the left and right beards of the longicorn group are respectively.
In the present embodiment, the fitness function value f (x) of the right and left beards is obtained from the right and left beards of the Tian Niu r ) And f (x) l ) Updating the position of the longicorn, calculating the fitness function value of the updated longicorn, and if the fitness function value is superior to the second fitness function value Y best Then update X with updated longicorn location best Updating Y with the updated fitness function value best
In the embodiment, the longhorn beetle group search algorithm is applied to optimize the output-implicit, implicit-accepting and implicit-output weights and thresholds of the Elman neural network on the basis of the fitness function, the longhorn beetle group search algorithm is initialized, and the Elman neural network model optimized by the longhorn beetle group search algorithm enables photovoltaic power generation short-term power prediction to be more accurate and direct prediction to be more convenient.
Step S103: calculating respective weights and thresholds of output-implicit, implicit-accepting and implicit-output of the Elman neural network according to the current self-adaptive step length and the current longicorn group position, so that the Elman neural network outputs a predicted value according to the current ownership weights and thresholds; calculating a first fitness function value of the updated longicorn group position according to the predicted value;
In this embodiment, the output-implicit weight Q of the Elman neural network is calculated 1 And a threshold w 1 Implicit-accepted weight Q 2 And a threshold w 2 And implicit-output weight Q 3 And a threshold w 3 :
Figure SMS_24
Figure SMS_25
Wherein eta is a step attenuation factor and x n k Mu, the current position of the longicorn group n Is the adaptive step size of the nth iteration.
In this embodiment, when the first fitness function value meets an iteration termination condition, the method further includes:
if the first fitness function value does not meet the iteration termination condition, updating the self-adaption step length:
μ n =η as μ n-10
μ n adaptive step size, μ for the nth iteration n-1 Adaptive step size, eta, for the n-1 th iteration as To search for step attenuation factor, μ 0 The initial searching step length is set;
according to the updated self-adaptive step length, optimizing the initial Tianniu group again;
the iteration termination condition is that the first fitness function value is greater than the second fitness function value and is maintained at a constant value.
In the embodiment, based on a step length updating strategy fed back by an optimizing result, if a longicorn group searches for a better fitness function value in a certain iteration process, that is, the longicorn group has found an optimal solution, the longicorn position is only required to be updated, and the step length is not required to be updated; if the fitness function value searched by the longicorn group does not meet the iteration termination condition, the situation that a better solution is not found is indicated, the current searching step length is considered to be too large, and the step length needs to be corrected; until the longicorn group searches for a better fitness function value, the parameters of the Elman neural network are optimized through the current longicorn group position updating weight and the threshold value, the Elman neural network optimized through the longicorn group searching algorithm of the step length updating strategy fed back by the optimizing result has a more accurate photovoltaic power generation short-term power prediction effect, photovoltaic power generation short-term power prediction precision is improved, and the direct prediction process is more convenient.
Step S104: when the first fitness function value meets an iteration termination condition, taking the current three weights and the current three thresholds as optimal parameters, so that the Elman neural network performs power prediction according to the optimal parameters; the iteration termination condition is greater than a preset value and maintained at a constant value.
In this embodiment, the iteration number is set to 30000, and whether the iteration termination condition is satisfied is determined; if the iteration of the longicorn group search algorithm is superior to the fitness function value and the fitness function value is maintained at a constant value at the moment, the condition that the iteration termination condition is met is indicated, and the current weight Q and the threshold w are output as the optimal weight and the optimal threshold; if not, updating the self-adaptive step length, and calculating the left and right whisker positions of the initial Tianniu group, namely, iterating again from the first round; the optimal forced updating weight and the threshold value obtained by the Elman neural network output by the self-adaptive longhorn beetle whisker algorithm are respectively 0.445 and 0.0899.
In this embodiment, photovoltaic power generation power data and meteorological data of 2021 years 8-12 months are recorded by real-time broadcast data of a solar 433kW photovoltaic power station in a certain place and are used as research objects, an adaptive longhorn beetle group search algorithm is adopted to optimize an Elman neural network to forcedly update a weight Q and a threshold w, in the longhorn beetle group search process, the iteration number and the change of the fitness value are as shown in fig. 2, the iteration number is set to be 20, and the fitness value satisfies more than 50 (the value is set according to practical application) after the iteration 20 times and is maintained at a constant value.
In this embodiment, after updating the weight and threshold of the Elman neural network, training the Elman neural network, and optimizing the Elman neural network model by using the longhorn beetle group search algorithm according to the historical output of the target area to perform the daily prediction output to be predicted:
creating a longicorn group search algorithm optimization-Elman neural network photovoltaic power generation prediction model based on weather similarity, and setting model parameters, wherein in the Elman neural network, the output of an input layer, an hidden layer and an output layer are respectively 5, 20 and 1; the input-implicit-output activation functions are tansig, purelin, respectively; the training function is traingdm; the number of iterations is 30000. The method comprises the steps of respectively predicting photovoltaic power generation short-term power in different weather, such as sunny days, cloudy days and rainy days, respectively optimizing an Elman prediction model by using an Elman neural network and the longhorn beetle group search algorithm of the invention for predicting the photovoltaic power generation short-term power in each weather, and comparing an output Elman neural network prediction curve and a prediction value curve of the longhorn beetle group search algorithm optimized Elman prediction model with an actual photovoltaic power generation output value curve.
In this embodiment, the prediction values of the different models of the 3 weather types are compared, and the longhorn beetle group search algorithm optimizes the curve of Elman, which is closer to the actual value than the prediction curve of Elman neural network, so that it can be obtained: the longhorn beetle group search algorithm optimizes an Elman photovoltaic power generation prediction model and has better prediction fitting capacity. Meanwhile, the prediction model in sunny days has higher prediction precision than other 2 weather prediction models, and weather factors in rainy days and cloudy days are larger, so that the final output and actual errors become larger.
The implementation of the embodiment of the invention has the following effects:
according to the method, the comprehensive similarity value of the day to be predicted and each historical day is calculated, the photovoltaic power actual value of the first historical day with the highest comprehensive similarity value with the day to be predicted is obtained, the photovoltaic power actual value of the first historical day with the highest comprehensive similarity value is utilized to construct an adaptability function, the adaptability function takes the comprehensive similarity as a core, the self-adaptive longhorn beetle group search algorithm is used for determining the output-implicit, implicit-accepting and implicit-output weight and threshold value of the Elman neural network on the basis, parameters of the Elman neural network are optimized, the Elman neural network optimized through the longhorn group search algorithm has a more accurate photovoltaic power generation short-term power prediction effect, photovoltaic power generation short-term power prediction accuracy is improved, and the direct prediction process is more convenient; for the power grid, accurate short-term power generation prediction provides a data basis for power grid dispatching, saves a large amount of electric energy, improves the economical type of operation of the power system, and ensures that the operation of the power system is more stable and safer.
Example two
Referring to fig. 3, a photovoltaic power generation short-term power prediction apparatus according to an embodiment of the present invention includes: an acquisition module 201, an update module 202 and a prediction module 203;
The obtaining module 201 is configured to obtain weather influencing factors of a day to be predicted and a plurality of history days, calculate a comprehensive similarity value of the day to be predicted and each history day, and obtain an actual photovoltaic power value of a first history day with a highest comprehensive similarity value with the day to be predicted;
the updating module 202 is configured to construct an fitness function according to the photovoltaic power output value of the day to be predicted and the photovoltaic power actual value of the first historical day; determining the position of an initial longicorn group according to weather influence factors of the day to be predicted, optimizing the initial longicorn group according to the fitness function and the self-adaptive step length, and updating the position of the initial longicorn group;
calculating respective weights and thresholds of output-implicit, implicit-accepting and implicit-output of the Elman neural network according to the current self-adaptive step length and the current longicorn group position, so that the Elman neural network outputs a predicted value according to the current ownership weights and thresholds; calculating a first fitness function value of the updated longicorn group position according to the predicted value;
the prediction module 203 is configured to take the current three weights and the current three thresholds as optimal parameters when the first fitness function value meets an iteration termination condition, so that the Elman neural network performs power prediction according to the optimal parameters; the iteration termination condition is greater than a preset value and maintained at a constant value.
The update module 202 includes: an initialization unit, an update unit and a calculation unit;
the initialization unit is used for determining the self-adaptive step length of the antenna group search algorithm:
μ n =-arctan[a(n+b)]+c;
wherein mu n For the self-adaptive step length, n is the iteration number, and step length parameters a, b and c are preset parameter values;
initializing a longicorn group search direction:
Figure SMS_26
in the method, in the process of the invention,
Figure SMS_27
represents the searching direction of the kth longhorn beetle, K is 1,2,3 and … K; k is the longicorn population scale; rand represents a random function; g represents a spatial dimension;
selecting random numbers between [ -1,1] as an initial solution set of a siren group searching algorithm and an initial position of a siren group;
calculating a second fitness function value of the initial position of the longicorn according to the self-adaptive step length;
calculating the left whisker position and the right whisker position of the initial Tian Niu group:
Figure SMS_28
wherein x is r k And x l k Respectively representing the left whisker position and the right whisker position of the kth longhorn beetle, wherein n is the current iteration number and x n k Represents the position of the kth longicorn at the nth iteration, d n k For the distance between the longhorn beetle whisker and the longhorn beetle position at the nth iteration of the kth longhorn beetle, the calculation formula is as follows:
d n =η a d n-1 +d 0
wherein eta is a d is a distance attenuation factor between the longhorn beetle beards and the longhorn beetle positions, d 0 Is the initial distance.
The updating unit is used for updating the position of the longhorn beetle group by taking the characteristic vector of the nth weather factor of the day to be predicted as the left and right whisker positions of the kth longhorn beetle, and the characteristic vector is expressed as follows:
Figure SMS_29
Wherein f is a fitness function, sign is a sign function, μ n For the adaptive step size of the nth iteration, f (x r ) And f (x) l ) The fitness function values of the left and right beards of the longicorn group are respectively;
the computing unit is used for computing the output-implicit weight Q of the Elman neural network 1 And a threshold w 1 Implicit-accepted weight Q 2 And a threshold w 2 And implicit-output weight Q 3 And a threshold w 3 ::
Figure SMS_30
Figure SMS_31
Wherein eta is a step attenuation factor and x n k Mu, the current position of the longicorn group n Is the adaptive step size of the nth iteration.
The photovoltaic power generation short-term power prediction device can implement the photovoltaic power generation short-term power prediction method of the method embodiment. The options in the method embodiments described above are also applicable to this embodiment and will not be described in detail here. The rest of the embodiments of the present application may refer to the content of the method embodiments described above, and in this embodiment, no further description is given.
The implementation of the embodiment of the invention has the following effects:
the acquisition module of the photovoltaic power generation short-term power prediction device acquires the photovoltaic power actual value of the first historical day with the highest comprehensive similarity value with the day to be predicted by calculating the day to be predicted and the comprehensive similarity value of each historical day, and constructs an adaptability function by utilizing the photovoltaic power actual value of the first historical day with the highest comprehensive similarity value, wherein the adaptability function takes the comprehensive similarity as a core, the updating module determines the output-hidden, hidden-accepting and hidden-output weight and threshold of the Elman neural network by using the self-adaptive longicorn group search algorithm on the basis, the parameters of the Elman neural network are optimized, the prediction module predicts the photovoltaic power generation short-term power by utilizing the optimized parameters of the Elman neural network, and the Elman neural network optimized by the longicorn group search algorithm has more accurate photovoltaic power prediction effect, improves the photovoltaic power generation short-term power prediction precision, and the direct prediction process is more convenient; for the power grid, accurate short-term power generation prediction provides a data basis for power grid dispatching, saves a large amount of electric energy, improves the economical type of operation of the power system, and ensures that the operation of the power system is more stable and safer.
Example III
Correspondingly, the invention further provides a computer readable storage medium, which comprises a stored computer program, wherein the computer program is used for controlling equipment where the computer readable storage medium is located to execute the photovoltaic power generation short-term power prediction method according to any embodiment.
The computer program may be divided into one or more modules/units, which are stored in the memory and executed by the processor to accomplish the present invention, for example. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments are used for describing the execution of the computer program in the terminal device.
The terminal equipment can be computing equipment such as a desktop computer, a notebook computer, a palm computer, a cloud server and the like. The terminal device may include, but is not limited to, a processor, a memory.
The processor may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, which is a control center of the terminal device, and which connects various parts of the entire terminal device using various interfaces and lines.
The memory may be used to store the computer program and/or the module, and the processor may implement various functions of the terminal device by running or executing the computer program and/or the module stored in the memory and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the mobile terminal, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash Card (Flash Card), at least one disk storage device, flash memory device, or other volatile solid-state storage device.
Wherein the terminal device integrated modules/units may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as stand alone products. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth.
The foregoing embodiments have been provided for the purpose of illustrating the general principles of the present invention, and are not to be construed as limiting the scope of the invention. It should be noted that any modifications, equivalent substitutions, improvements, etc. made by those skilled in the art without departing from the spirit and principles of the present invention are intended to be included in the scope of the present invention.

Claims (10)

1. A photovoltaic power generation short-term power prediction method, comprising:
obtaining weather influence factors of a day to be predicted and a plurality of history days, calculating comprehensive similarity values of the day to be predicted and each history day, and obtaining a photovoltaic power actual value of a first history day with the highest comprehensive similarity value with the day to be predicted;
constructing an adaptability function according to the photovoltaic power output value of the day to be predicted and the photovoltaic power actual value of the first historical day; determining the position of an initial longicorn group according to weather influence factors of the day to be predicted, optimizing the initial longicorn group according to the fitness function and the self-adaptive step length, and updating the position of the initial longicorn group;
calculating respective weights and thresholds of output-implicit, implicit-accepting and implicit-output of the Elman neural network according to the current self-adaptive step length and the current longicorn group position, so that the Elman neural network outputs a predicted value according to the current ownership weights and thresholds; calculating a first fitness function value of the updated longicorn group position according to the predicted value;
When the first fitness function value meets an iteration termination condition, taking the current three weights and the current three thresholds as optimal parameters, so that the Elman neural network performs power prediction according to the optimal parameters; the iteration termination condition is greater than a preset value and maintained at a constant value.
2. The method for predicting the short-term power of photovoltaic power generation according to claim 1, wherein the weather influence factors of the day to be predicted and the plurality of history days are obtained, and the comprehensive similarity value of the day to be predicted and each history day is calculated, specifically:
according to weather influence factors of a day to be predicted and a plurality of historical days, a first influence factor matrix of the day to be predicted and a second influence factor matrix of the historical days are constructed, and the first influence factor matrix and the second influence factor matrix are subtracted to obtain a distance matrix; adding the elements of the distance matrix to obtain distance similarity values of a day to be predicted and a plurality of history days;
mapping the numerical values of each row of the first influence factor matrix and the second influence factor matrix into a three-dimensional space respectively to obtain a first trend matrix of a day to be predicted and a second trend matrix of a history day; the numerical values of each row of the first influence factor matrix and the second influence factor matrix are respectively characteristic vectors of a plurality of weather factors of each day;
Calculating angle cosine values of vectors corresponding to the first trend matrix and the second trend matrix, projecting the angle cosine values into the interval of [0,1], and superposing the angle cosine values at each moment to obtain a trend similarity value;
and calculating the comprehensive similarity according to the distance similarity value and the trend similarity value.
3. The method for predicting the short-term power of photovoltaic power generation according to claim 1, wherein the constructing the fitness function according to the photovoltaic power output value of the day to be predicted and the photovoltaic power actual value of the first history day specifically comprises:
Figure FDA0004069511310000021
α=P t+1,e -P t,e
β=P t+1,o -P t,o
wherein fTo adapt the function, P t+1,e And P t,e The actual photovoltaic power value P of the first historical day at the t+1 time and the t time t+1,o And P t,o And the output value is the output value of the solar photovoltaic power to be predicted at the t+1 time and the t time.
4. The method for predicting short-term power of photovoltaic power generation according to claim 1, wherein before determining the initial longicorn group position according to the weather-influencing factor of the day to be predicted, the method further comprises:
determining the self-adaptive step length of a Tianniu group search algorithm:
μ n =-arctan[a(n+b)]+c;
wherein mu n For the self-adaptive step length, n is the iteration number, and step length parameters a, b and c are preset parameter values;
initializing a longicorn group search direction:
Figure FDA0004069511310000022
In the method, in the process of the invention,
Figure FDA0004069511310000023
represents the searching direction of the kth longhorn beetle, K is 1,2,3 and … K; k is the longicorn population scale; rand represents a random function; g represents a spatial dimension;
selecting random numbers between [ -1,1] as an initial solution set of a siren group searching algorithm and an initial position of a siren group;
calculating a second fitness function value of the initial position of the longicorn according to the self-adaptive step length;
calculating the left whisker position and the right whisker position of the initial Tian Niu group:
Figure FDA0004069511310000031
wherein x is r k And x l k Respectively representing the left whisker position and the right whisker position of the kth longicorn, wherein n is the currentNumber of iterations, x n k Represents the position of the kth longicorn at the nth iteration, d n k For the distance between the longhorn beetle whisker and the longhorn beetle position at the nth iteration of the kth longhorn beetle, the calculation formula is as follows:
d n =η a d n-1 +d 0
wherein eta is a d is a distance attenuation factor between the longhorn beetle beards and the longhorn beetle positions, d 0 Is the initial distance.
5. The method for predicting the short-term power of photovoltaic power generation according to claim 4, wherein determining the initial longicorn group position according to the weather influence factor of the day to be predicted, optimizing the initial longicorn group according to the fitness function and the adaptive step length, and updating the initial longicorn group position comprises the following steps:
and taking the characteristic vector of the nth weather factor of the day to be predicted as the left and right whisker positions of the kth longhorn beetle, and updating the longhorn beetle group positions, wherein the characteristic vector is expressed as follows:
Figure FDA0004069511310000032
Wherein f is a fitness function, sign is a sign function, μ n For the adaptive step size of the nth iteration, f (x r ) And f (x) l ) The fitness function values of the left and right beards of the longicorn group are respectively.
6. The method for predicting the short-term power of photovoltaic power generation according to claim 5, wherein the calculating the respective weights and thresholds of the output-implicit, implicit-accepting and implicit-output of the Elman neural network according to the current adaptive step size and the current longicorn group position is specifically as follows:
calculating the output-implicit weight Q of an Elman neural network 1 And a threshold w 1 Implicit-accepted weight Q 2 And a threshold w 2 And implicit-output weight Q 3 And a threshold w 3 :
Figure FDA0004069511310000041
Figure FDA0004069511310000042
Wherein eta is a step attenuation factor and x n k Mu, the current position of the longicorn group n Is the adaptive step size of the nth iteration.
7. The method for short-term power prediction for photovoltaic power generation according to claim 6, wherein when the first fitness function value satisfies an iteration termination condition, further comprising:
if the first fitness function value does not meet the iteration termination condition, updating the self-adaption step length:
μ n =η as μ n-10
μ n adaptive step size, μ for the nth iteration n-1 Adaptive step size, eta, for the n-1 th iteration as To search for step attenuation factor, μ 0 The initial searching step length is set;
according to the updated self-adaptive step length, optimizing the initial Tianniu group again;
the iteration termination condition is that the first fitness function value is greater than the second fitness function value and is maintained at a constant value.
8. A photovoltaic power generation short-term power prediction apparatus, comprising: the system comprises an acquisition module, an updating module and a prediction module;
the acquisition module is used for acquiring weather influence factors of a day to be predicted and a plurality of history days, calculating comprehensive similarity values of the day to be predicted and each history day, and acquiring a photovoltaic power actual value of a first history day with the highest comprehensive similarity value with the day to be predicted;
the updating module is used for constructing an adaptability function according to the photovoltaic power output value of the day to be predicted and the photovoltaic power actual value of the first historical day; determining the position of an initial longicorn group according to weather influence factors of the day to be predicted, optimizing the initial longicorn group according to the fitness function and the self-adaptive step length, and updating the position of the initial longicorn group;
calculating respective weights and thresholds of output-implicit, implicit-accepting and implicit-output of the Elman neural network according to the current self-adaptive step length and the current longicorn group position, so that the Elman neural network outputs a predicted value according to the current ownership weights and thresholds; calculating a first fitness function value of the updated longicorn group position according to the predicted value;
The prediction module is used for taking the current three weights and the current three thresholds as optimal parameters when the first fitness function value meets an iteration termination condition, so that the Elman neural network performs power prediction according to the optimal parameters; the iteration termination condition is greater than a preset value and maintained at a constant value.
9. The photovoltaic power generation short-term power prediction apparatus according to claim 8, wherein the update module comprises: an initialization unit, an update unit and a calculation unit;
the initialization unit is used for determining the self-adaptive step length of the antenna group search algorithm:
μ n =-arctan[a(n+b)]+c;
wherein mu n For the self-adaptive step length, n is the iteration number, and step length parameters a, b and c are preset parameter values;
initializing a longicorn group search direction:
Figure FDA0004069511310000051
in the method, in the process of the invention,
Figure FDA0004069511310000052
indicating the kth dayThe searching direction of the cattle is K epsilon 1,2,3 and … K; k is the longicorn population scale; rand represents a random function; g represents a spatial dimension;
selecting random numbers between [ -1,1] as an initial solution set of a siren group searching algorithm and an initial position of a siren group;
calculating a second fitness function value of the initial position of the longicorn according to the self-adaptive step length;
calculating the left whisker position and the right whisker position of the initial Tian Niu group:
Figure FDA0004069511310000053
Wherein x is r k And x l k Respectively representing the left whisker position and the right whisker position of the kth longhorn beetle, wherein n is the current iteration number and x n k Represents the position of the kth longicorn at the nth iteration, d n k For the distance between the longhorn beetle whisker and the longhorn beetle position at the nth iteration of the kth longhorn beetle, the calculation formula is as follows:
d n =η a d n-1 +d 0
wherein eta is a d is a distance attenuation factor between the longhorn beetle beards and the longhorn beetle positions, d 0 Is the initial distance.
The updating unit is used for updating the position of the longhorn beetle group by taking the characteristic vector of the nth weather factor of the day to be predicted as the left and right whisker positions of the kth longhorn beetle, and the characteristic vector is expressed as follows:
Figure FDA0004069511310000061
wherein f is a fitness function, sign is a sign function, μ n For the adaptive step size of the nth iteration, f (x r ) And f (x) l ) The fitness function values of the left and right beards of the longicorn group are respectively;
the computing unit is used for computing the output-implicit weight Q of the Elman neural network 1 And a threshold w 1 Implicit-accepted weight Q 2 And a threshold w 2 And implicit-output weight Q 3 And a threshold w 3 ::
Figure FDA0004069511310000062
Figure FDA0004069511310000063
Wherein eta is a step attenuation factor and x n k Mu, the current position of the longicorn group n Is the adaptive step size of the nth iteration.
10. A computer readable storage medium, wherein the computer readable storage medium comprises a stored computer program; wherein the computer program, when run, controls a device in which the computer readable storage medium is located to perform a photovoltaic power generation short-term power prediction method according to any one of claims 1 to 7.
CN202310088214.8A 2023-01-17 2023-01-17 Photovoltaic power generation short-term power prediction method, device and storage medium Pending CN116070758A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310088214.8A CN116070758A (en) 2023-01-17 2023-01-17 Photovoltaic power generation short-term power prediction method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310088214.8A CN116070758A (en) 2023-01-17 2023-01-17 Photovoltaic power generation short-term power prediction method, device and storage medium

Publications (1)

Publication Number Publication Date
CN116070758A true CN116070758A (en) 2023-05-05

Family

ID=86171202

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310088214.8A Pending CN116070758A (en) 2023-01-17 2023-01-17 Photovoltaic power generation short-term power prediction method, device and storage medium

Country Status (1)

Country Link
CN (1) CN116070758A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117293817A (en) * 2023-10-10 2023-12-26 华润电力技术研究院有限公司 Power generation parameter prediction method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117293817A (en) * 2023-10-10 2023-12-26 华润电力技术研究院有限公司 Power generation parameter prediction method and device
CN117293817B (en) * 2023-10-10 2024-06-07 华润电力技术研究院有限公司 Power generation parameter prediction method and device

Similar Documents

Publication Publication Date Title
CN109118025A (en) A kind of method and apparatus of electric system prediction
CN116596044B (en) Power generation load prediction model training method and device based on multi-source data
CN116070758A (en) Photovoltaic power generation short-term power prediction method, device and storage medium
CN113705929B (en) Spring festival holiday load prediction method based on load characteristic curve and typical characteristic value fusion
CN112836885B (en) Combined load prediction method, combined load prediction device, electronic equipment and storage medium
CN112365097A (en) Method, device and equipment for processing electricity consumption data and computer readable storage medium
CN113361785A (en) Power distribution network short-term load prediction method and device, terminal and storage medium
CN114676923A (en) Method and device for predicting generated power, computer equipment and storage medium
CN113962491A (en) Short-term combined prediction method and device for cooling, heating and power loads based on seasonal decomposition
CN112381315A (en) LS-SVM intelligent platform area load prediction method and system based on PSO optimization
CN116799796A (en) Photovoltaic power generation power prediction method, device, equipment and medium
CN117668563B (en) Text recognition method, text recognition device, electronic equipment and readable storage medium
CN113094899B (en) Random power flow calculation method and device, electronic equipment and storage medium
CN117708710A (en) Short-term lightweight load prediction method for power distribution area
CN113065904A (en) Peak-shaving auxiliary service clearing price prediction method and device based on deep learning
CN116826699A (en) Photovoltaic cluster power prediction method, device, equipment and medium
CN113779861B (en) Photovoltaic Power Prediction Method and Terminal Equipment
WO2023009070A2 (en) Method and apparatus for forecasting optical power, computer device and storage medium
CN114139783A (en) Wind power short-term power prediction method and device based on nonlinear weighted combination
CN114169923A (en) Photovoltaic power station power prediction method, system, terminal and storage medium
CN111931994A (en) Short-term load and photovoltaic power prediction method, system, equipment and medium thereof
CN113298329A (en) Training and strategy generating method, system, computer device and storage medium
CN117217822B (en) Method, device, terminal equipment and storage medium for predicting power transaction index
CN114399152B (en) Method and device for optimizing comprehensive energy scheduling of industrial park
CN118171126A (en) Irradiance and photovoltaic power generation power combination prediction method and device

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