CN111091139B - Photovoltaic prediction method, device and equipment for similar day clustering and readable storage medium - Google Patents

Photovoltaic prediction method, device and equipment for similar day clustering and readable storage medium Download PDF

Info

Publication number
CN111091139B
CN111091139B CN201911130195.0A CN201911130195A CN111091139B CN 111091139 B CN111091139 B CN 111091139B CN 201911130195 A CN201911130195 A CN 201911130195A CN 111091139 B CN111091139 B CN 111091139B
Authority
CN
China
Prior art keywords
weather forecast
data
historical
forecast data
prediction
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.)
Active
Application number
CN201911130195.0A
Other languages
Chinese (zh)
Other versions
CN111091139A (en
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.)
TBEA Xinjiang Sunoasis Co Ltd
TBEA Xian Electric Technology Co Ltd
Original Assignee
TBEA Xinjiang Sunoasis Co Ltd
TBEA Xian Electric Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TBEA Xinjiang Sunoasis Co Ltd, TBEA Xian Electric Technology Co Ltd filed Critical TBEA Xinjiang Sunoasis Co Ltd
Priority to CN201911130195.0A priority Critical patent/CN111091139B/en
Publication of CN111091139A publication Critical patent/CN111091139A/en
Application granted granted Critical
Publication of CN111091139B publication Critical patent/CN111091139B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • G06F18/2135Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on approximation criteria, e.g. principal component analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • 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
    • 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/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply

Abstract

The invention belongs to the technical field of photovoltaic power generation, and discloses a photovoltaic prediction method, a device and equipment for similar daily clustering and a readable storage medium, wherein the method comprises the following steps: clustering the historical weather forecast data on similar days to obtain historical weather forecast data corresponding to various similar days; constructing an LSTM neural network model, and respectively training historical meteorological prediction data corresponding to various similar days by using the LSTM neural network model to obtain an LSTM neural network prediction model corresponding to various similar days; and determining the type of a similar day to which the weather forecast data of the time period to be forecast belongs, and inputting the weather forecast data of the time period to be forecast into an LSTM network forecast model corresponding to the similar day to obtain a photovoltaic power forecast value. And similar daily clustering is carried out according to different meteorological conditions, so that the photovoltaic power prediction accuracy under various non-ideal weather conditions is remarkably improved compared with the traditional single prediction model.

Description

Photovoltaic prediction method, device and equipment for similar day clustering and readable storage medium
Technical Field
The invention belongs to the technical field of photovoltaic power generation, and relates to a photovoltaic prediction method, device and equipment for similar daily clustering and a readable storage medium.
Background
In recent years, solar energy development and utilization become an important field of global energy transformation, and photovoltaic power generation comprehensively enters a large-scale development stage and has a good development prospect. Meanwhile, photovoltaic power generation also faces the problems that the output is greatly influenced by factors such as weather, has strong intermittence and volatility and the like, and restricts the application of high-proportion photovoltaic power generation in a power grid. If the photovoltaic power generation output prediction can be accurately performed, the operation efficiency of the photovoltaic power station can be improved, the dispatching department can be helped to adjust the operation mode, and the safe, stable and economic operation of the power system after the high-proportion photovoltaic is connected can be ensured.
The photovoltaic power generation power is greatly affected by environmental factors and shows different power generation characteristics in different weather environments, so that a prediction model can be established for the photovoltaic power generation power prediction in a classification prediction mode, namely according to seasons or weather types, so that the prediction precision is improved to a certain extent, but the prediction model is divided according to one weather factor, the result of the mutual influence of each environmental factor is not considered, the classification mode is slightly rough, the pertinence of the prediction model obtained according to classification is not obvious, and the prediction precision is lower. Meanwhile, the photovoltaic power shows obvious periodic variation, and a common support vector machine, a genetic algorithm and a common neural network have certain disadvantages in the processing of the time sequence data, so that the prediction result is influenced to a certain extent, and the prediction result cannot meet the requirements.
Disclosure of Invention
The invention aims to overcome the defect of low photovoltaic power generation power prediction precision in the prior art and provides a photovoltaic prediction method, device and equipment for similar daily clustering and a readable storage medium.
In order to achieve the purpose, the invention is realized by adopting the following technical scheme:
a photovoltaic prediction method for similar day clustering comprises the following steps:
s1: clustering the historical weather forecast data on similar days to obtain historical weather forecast data corresponding to various similar days;
S2: constructing an LSTM neural network model, and respectively using historical meteorological prediction data and historical photovoltaic power data corresponding to various similar days for training the LSTM neural network model to obtain an LSTM neural network prediction model corresponding to various similar days;
S3: and determining a similar day type to which weather prediction data of the time period to be predicted belongs, and inputting the weather prediction data of the time period to be predicted and historical photovoltaic power data of a preset time before the time period to be predicted into an LSTM neural network prediction model corresponding to the similar day type to obtain a photovoltaic power prediction value.
The photovoltaic prediction method for similar daily clustering is further improved by the following steps:
the specific method of the S1 is as follows:
s1-1: normalizing the historical weather forecast data to obtain normalized historical weather forecast data;
s1-2: performing dimension reduction processing on the normalized historical weather forecast data through a PCA algorithm to obtain dimension-reduced historical weather forecast data;
S1-3: clustering is carried out through a K value averaging method, and the historical weather forecast data after dimension reduction is classified according to the similarity, so that the historical weather forecast data corresponding to various similar days is obtained.
The specific method of the S1-2 is as follows:
S1-2-1: all normalized historical meteorological prediction data are decentered through the following steps to obtain decentered historical meteorological data w i':
wherein m 0 is the characteristic dimension of the historical weather forecast data, and w j * is the normalized historical weather forecast data;
s1-2-2: calculating covariance matrixes W 'W' T of all the decentralised historical meteorological prediction data; wherein, W 'T is the transposed matrix of W';
S1-2-3: decomposing the covariance matrix W 'W' T as characteristic values to obtain m 0 characteristic values and m 0 characteristic vectors corresponding to m 0 characteristic values;
S1-2-4: taking the maximum m eigenvalues and the corresponding m eigenvectors to form a projection matrix;
s1-2-5: multiplying the matrix formed by the normalized historical weather forecast data with the projection matrix to obtain a reduced-dimension historical weather forecast data set W i=(wi1;wi2;...;wim) is the historical weather forecast data after the dimension reduction, and m is the characteristic dimension of the historical weather forecast data after the dimension reduction.
The specific method of S1-3 is as follows:
S1-3-1: dividing N pieces of dimension-reduced historical weather forecast data into k clusters C= { C 1,C2,...Ck }, wherein C k=(ck1,ck2,...ckm), and randomly selecting one piece of the dimension-reduced historical weather forecast data from the N pieces of dimension-reduced historical weather forecast data to serve as the center of the cluster C 1;
S1-3-2: calculating the shortest distance between each dimension-reduced historical weather forecast data and the center of the current cluster Wherein w i is the ith feature of each dimension-reduced historical weather forecast data, c i is the ith feature of the cluster center, and the probability/>, of each dimension-reduced historical weather forecast data being selected as the next cluster center is calculatedThen generating a random number of 0-1, and sequentially combining the random number with/>Compare until/>Greater than random number, then current/>The corresponding historical weather forecast data after dimension reduction is a cluster center;
s1-3-3: repeating S1-3-2 until cluster centers of all clusters are determined;
S1-3-4: dividing each dimension-reduced historical weather forecast data into clusters corresponding to the cluster center with the smallest distance according to the distance between each dimension-reduced historical weather forecast data and all cluster centers;
s1-3-5: re-calculating the cluster center of each cluster according to the historical weather forecast data after dimension reduction in each cluster, Wherein w j is the j-th historical weather forecast data in the cluster C i, and n ci is the number of samples of the historical weather forecast data in the cluster C i;
S1-3-6: repeating the steps S1-3-4 and S1-3-5 until the preset iteration times of the program or the center change distance of each cluster is smaller than a preset value;
s1-3-7: and determining the cluster center of each final cluster and all clusters to which the reduced-dimension historical weather forecast data belong, wherein each cluster is used as a similar day.
The specific method for constructing the LSTM neural network model in the S2 comprises the following steps:
R1: normalizing the historical photovoltaic power data and the photovoltaic irradiation prediction historical data to obtain normalized historical photovoltaic power data and normalized photovoltaic irradiation prediction historical data;
r2: establishing an LSTM network structure by adopting an LSTM algorithm, adopting normalized historical photovoltaic power data and normalized photovoltaic irradiation prediction historical data as inputs, obtaining a photovoltaic power prediction value through the LSTM network structure, and obtaining a photovoltaic power prediction error;
R3: calculating a cost function of the LSTM model, wherein the cost function is root mean square error of a photovoltaic power predicted value and a corresponding photovoltaic power true value, and adjusting LSTM network structure parameters according to the root mean square error by a random gradient descent method with batch;
R4: repeating R2 and R3 for a preset number of times to obtain the LSTM neural network model.
The specific method for determining the similar day type to which the weather forecast data of the period to be forecast belongs in the S3 is as follows:
and calculating the distance between the weather forecast data of the time period to be forecast and the center of each similar day type, wherein the weather forecast data of the time period to be forecast is the similar day type closest to the center.
And in the step S3, weather forecast data of a time period to be forecasted and historical photovoltaic power data of preset time before the time period to be forecasted are input into an LSTM neural network forecast model corresponding to the similar day type, and the specific method for obtaining the photovoltaic power forecast value is as follows:
T1: taking the actual photovoltaic power values of K times before the current T N time and weather forecast data of the T N+1 time as inputs, and obtaining a photovoltaic power forecast value of the T N+1 time through an LSTM neural network model corresponding to a similar day type to which the weather forecast data of the T N+1 time belongs;
T2: taking the actual photovoltaic power values of K times before the time T N+1 and weather forecast data of the time T N+2 as inputs, and obtaining the photovoltaic power forecast value of the time T N+2 through an LSTM neural network model corresponding to the similar day type to which the weather forecast data of the time T N+2 belongs;
T3: and repeating the step T2 until a photovoltaic power predicted value from the moment T N+1 to the end of the whole period to be predicted is obtained.
In a second aspect of the present invention, an LSTM photovoltaic prediction apparatus for similar day clustering, comprising:
The similar day clustering module is used for clustering the historical weather forecast data on similar days to obtain historical weather forecast data corresponding to various similar days, and obtaining photovoltaic historical data of various similar days according to the time of the historical weather data of various similar days;
The LSTM neural network model module is used for constructing an LSTM neural network model, and respectively using the historical meteorological prediction data and the historical photovoltaic power data corresponding to various similar days for training the LSTM neural network model to obtain the LSTM neural network prediction model corresponding to various similar days;
And the photovoltaic power prediction module is used for determining the similar day type of the weather prediction data of the time period to be predicted, and inputting the weather prediction data of the time period to be predicted and the historical photovoltaic power data of the preset time before the time period to be predicted into the LSTM neural network prediction model corresponding to the similar day type to obtain the photovoltaic power prediction value.
In a third aspect of the present invention, a terminal device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the LSTM photovoltaic prediction method of similar day clustering described above when executing the computer program.
In a fourth aspect of the present invention, a computer readable storage medium stores a computer program, wherein the computer program when executed by a processor implements the steps of the LSTM photovoltaic prediction method for similar day clustering described above.
Compared with the prior art, the invention has the following beneficial effects:
The method comprises the steps of clustering similar days of daily weather prediction data in historical weather prediction data, constructing an LSTM neural network model, training the historical weather prediction data corresponding to various similar days by using the LSTM neural network model according to various similar day types to obtain the LSTM neural network prediction model corresponding to various similar days, inputting the weather prediction data of a period to be predicted into the LSTM neural network prediction model corresponding to the similar day to conduct photovoltaic power prediction by determining the similar day type to which the weather prediction data of the period to be predicted belongs, effectively reducing the influence of different weather types on the prediction model, enabling the built prediction model to be more specific, clustering similar days according to different weather conditions, adopting the LSTM neural network prediction model, inputting weather prediction information corresponding to the historical photovoltaic power besides the historical information containing the photovoltaic power, and remarkably improving the accuracy of photovoltaic power prediction under various non-ideal conditions compared with the traditional single prediction model.
Further, the PCA algorithm is adopted to carry out dimension reduction processing on the normalized historical weather forecast data, so that the dimension of the weather forecast data for similar day clustering is effectively reduced, the calculated amount during similar day clustering is shortened, and the influence of noise and invalid information on the similar day clustering is restrained.
Drawings
FIG. 1 is a schematic flow chart of a photovoltaic prediction method of similar day clustering of the present invention;
FIG. 2 is a graph of actual photovoltaic power values and predicted results obtained by the method of the present invention for a sunny day;
Fig. 3 is a graph of the actual photovoltaic power values in a rainy day, the results obtained by the conventional seasonal LSTM prediction method, and the predicted results obtained by the method of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. 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.
The invention is described in further detail below with reference to the attached drawing figures:
referring to fig. 1, the photovoltaic prediction method of the present invention for similar day clustering includes the following steps.
Step 1: and clustering similar days.
1. And carrying out normalization processing on historical weather forecast data of the photovoltaic power station.
The historical weather forecast data generally comprises irradiance, cloud cover, temperature, rainfall and the like, and the maximum value and the minimum value of each historical weather forecast data are set, and the historical weather forecast data are normalized according to the formula (1):
Wherein w is the measured value of the historical meteorological data, w min is the minimum value of the measured value of the historical meteorological data, and w max is the maximum value of the measured value of the historical meteorological data.
2. And performing principal component analysis (PRINCIPAL COMPONENT ANALYSIS, PCA) on the historical weather forecast data to reduce the feature dimension of the data and reduce the influence of irrelevant features on sample classification.
Normalized n w historical weather forecast data composition matricesWherein the method comprises the steps ofI=1 to n w, the initial historical weather forecast data has m 0 characteristics, the information quantity is less to remove, even the information dimension is invalid, the noise of the initial historical weather forecast data is filtered, and therefore, the PCA algorithm is adopted to carry out dimension reduction on the initial historical weather forecast data, the data dimension is reduced to m, and a dimension-reduced data set is obtained.
Firstly, all historical meteorological prediction data are subjected to decentralization through a formula (2), and the decentralized historical meteorological data are obtained, namely:
Where m 0 is the characteristic dimension of the historical weather forecast data, w i' is the decentered historical weather forecast data, and w j * is the original historical weather forecast data.
Second, calculate the covariance matrix W 'W' T of all the decentered historical meteorological prediction data, whereinW 'T is the transposed matrix of W'.
And thirdly, performing eigenvalue decomposition on the covariance matrix to obtain m 0 eigenvalues and m 0 eigenvectors corresponding to the m 0 eigenvalues.
And fourthly, taking the m largest eigenvalues and m eigenvectors corresponding to the m eigenvalues to form a projection matrix.
Fifthly, multiplying the original data composition matrix by the projection matrix to obtain a reduced-dimension historical weather forecast data setW i=(wi1;wi2;...;wim) is the historical weather forecast data after the dimension reduction, and m is the characteristic dimension of the historical weather forecast data after the dimension reduction.
3. And clustering by adopting a K value averaging method, and classifying the historical weather forecast data after the dimension reduction according to the similarity to obtain various historical weather forecast data.
First, dividing the N dimension-reduced historical weather forecast data into k clusters C= { C 1,C2,...Ck }, wherein C k=(ck1,ck2,...ckm), and randomly selecting one historical weather forecast data from the N dimension-reduced historical weather forecast data as the center of the cluster C 1.
Step two, calculating the shortest distance between each dimension-reduced historical weather forecast data and the current clustering centerWherein w i is the ith feature of each sample data, c i is the ith feature of the cluster center, and the probability/>, of each reduced-dimension historical weather forecast data being selected as the next cluster center is calculated according to the ith featureThen selecting the next cluster center according to the wheel disc method, namely generating a random number of 0-1, and sequentially combining the random number with/>Compare until/>Greater than the random number, at this time/>The corresponding sample data is the cluster center.
Third, repeating the second step until the cluster centers of all clusters are determined.
And fourthly, dividing each dimension-reduced historical weather forecast data into clusters corresponding to the cluster center with the smallest distance according to the distance between each dimension-reduced historical weather forecast data and all cluster centers.
Fifthly, recalculating the cluster center of each cluster according to the historical weather forecast data after dimension reduction in each category,Where w j is the j-th historical weather forecast data in cluster C i and n ci is the number of samples of the historical weather forecast data in cluster C i.
And sixthly, repeating the fourth step and the fifth step until the preset iteration times (generally 100-200 according to the different feature numbers of the weather data samples) of the program are reached or the center change distance of each cluster is smaller than a preset value (preferably 1e -3~1e-4).
And seventhly, determining the cluster center of each final cluster and all clusters to which the reduced-dimension historical weather forecast data belong.
Step 2: and establishing a prediction model.
1. Normalizing historical photovoltaic power data and photovoltaic irradiation prediction historical data:
Wherein p is photovoltaic power, p min and p max are respectively the minimum and maximum values of the photovoltaic power, r is a photovoltaic irradiation predicted value, and r min and r max are the maximum and minimum values of the photovoltaic irradiation predicted value.
2. And building a photovoltaic prediction model by adopting an LSTM algorithm.
Step 1), constructing an LSTM network with a plurality of layers of neurons.
The training process of the LSTM neural network model is as follows:
Firstly, constructing an LSTM network structure, setting the number of hidden layers of the network, and initializing each neuron parameter;
Secondly, according to a network structure, the normalized historical photovoltaic power data and the photovoltaic irradiation prediction historical data are transmitted backwards through an LSTM network to obtain an LSTM model predicted value, and a photovoltaic power prediction error is obtained;
thirdly, calculating a cost function of the LSTM network structure, wherein the cost function of the LSTM network structure is root mean square error of a photovoltaic predicted value and a corresponding true value, and adjusting neuron parameters by adopting a random gradient descent method with batch.
And fourthly, repeating the second step and the third step until the preset cycle times are reached according to the adjusted neuron parameters, and obtaining the LSTM neural network model.
And 2) dividing the data into k groups according to the clustering result, wherein k is the number of similar day types, (the historical meteorological data of each similar day is used for obtaining the photovoltaic historical power value under the clustering day according to the time corresponding relation), obtaining the cluster center corresponding to k similar day clusters, and obtaining the LSTM network model corresponding to k clustering days after training the LSTM neural network model on the k groups of data sample data.
Step 3: photovoltaic power prediction.
1. And comparing the weather forecast data of the time period to be forecast with the distances between the cluster centers of all the clusters, judging the cluster to which the weather forecast data of the time period to be forecast belongs, and selecting a corresponding LSTM network forecast model according to the cluster to which the weather forecast data of the time period to be forecast belongs.
2. And inputting weather prediction data of a time period to be predicted into an LSTM network prediction model to obtain a photovoltaic power prediction value.
The first step, taking the actual photovoltaic power values (including T N) of the previous K times at the current time T N and weather forecast data of the time T N+1 as inputs, and obtaining the photovoltaic power forecast value of the next time T N+1 through an LSTM neural network model corresponding to the similar day type to which the weather forecast data of the time T N+1 belongs.
And secondly, taking actual photovoltaic power values (comprising T N+1) at K times before the next time T N+1 and weather forecast data at the time T N+2 as inputs (in the patent, the data are stored in a database, weather forecast data and photovoltaic actual measurement power at any time can be obtained according to the time stamp of the data), and obtaining the photovoltaic power forecast value at the time T N+2 through an LSTM neural network model corresponding to the similar day type to which the weather forecast data at the time T N+2 belongs.
And thirdly, repeating the second step until p points of photovoltaic power predicted values from the moment T N+1 to the moment T N+p are obtained.
In an exemplary embodiment, a computer readable storage medium is also provided, which stores a computer program which, when executed by a processor, implements the steps of the photovoltaic prediction method of similar day clustering. The computer storage media may be any available media or data storage device that can be accessed by a computer, including, but not limited to, magnetic storage (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO), etc.), optical storage (e.g., CD, DVD, BD, HVD, etc.), and semiconductor storage (e.g., ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid State Disk (SSD)), etc.
In an exemplary embodiment, there is also provided a terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the photovoltaic prediction method of similar day clustering when the computer program is executed. The processor may be a central processing unit (CentralProcessingUnit, CPU), but may also be other general purpose processors, digital signal processors (DigitalSignalProcessor, DSP), application specific integrated circuits (ApplicationSpecificIntegratedCircuit, ASIC), off-the-shelf programmable gate arrays (field-ProgrammableGateArray, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like.
The invention has the concrete implementation process that:
The time resolution of the temporary prediction is 5min, the weather prediction data comprise the prediction data of irradiance, temperature, cloud cover coverage rate and rainfall, and the photovoltaic output power of 0-168 h in the future is predicted by adopting the photovoltaic power actual values at the first M moments and the historical weather prediction data.
(1) And carrying out normalization processing on the photovoltaic power actual values and the historical weather forecast data for a total of N days, wherein the photovoltaic power actual values and the historical weather forecast data at 288N moments are altogether.
(2) For historical weather forecast data of N days, the total number of the characteristic quantities is 4 x 288, the PCA algorithm is adopted to carry out dimension reduction treatment, and the original 4 x 288 characteristic quantities are changed into s characteristic quantities.
(3) And clustering similar days for the N days according to the historical weather forecast data after dimension reduction by using a K value clustering method.
(4) Considering the characteristic that the predicted value of the photovoltaic power is strongly related to the photovoltaic irradiance, and meanwhile, in the example, the cloud cover quantity, the rainfall and the temperature have no obvious influence on the photovoltaic power as compared with the irradiance, the predicted value of the photovoltaic power and the predicted value of the photovoltaic irradiation are selected as input data of an LSTM network, an LSTM network model comprising an input layer, an hidden layer and an output layer is established, and in the example, the LSTM model comprises two hidden layers, and the numbers of neurons of the LSTM model are 288 and 96 respectively. In this embodiment, the LSTM model is built by calling the keras library in python, and the model needs to specify a network structure, the number of training cycles and batches, the adopted activation function, the selected gradient optimization algorithm, and the like during training.
(5) The historical data of the actual photovoltaic power value is p= [ P 1,p2...p288N ], wherein P 1 represents the actual photovoltaic power value at the time of 00:00 of day 1, P 288N represents the actual photovoltaic power value at the time of 23:55 of the last day, the predicted data of the historical irradiance is q= [ Q 1,q2...q288N ], wherein Q 1 represents the predicted data of the irradiance at the time of 00:00 of day 1, and Q 288N represents the predicted data of the irradiance at the time of 23:55 of the last day. According to the result of similar day clustering, the irradiance prediction data of each similar day and the actual value of the photovoltaic power at the corresponding moment are combined into an input matrix with the dimension of (288N i -M) multiplied by M multiplied by 2Where N i represents the number of days that similar day type i contains.
The input matrix X is put into an established LSTM network, and an output matrix Y with the dimension of (288N-M) X1 is obtained:
wherein, The power is predicted for the photovoltaic corresponding to the actual photovoltaic power value p M+1.
In particular, during the LSTM model training process, a loss function f loss is selected:
So as to more conform to the requirements of the photovoltaic prediction precision among the photovoltaic prediction related standards, wherein y i is the actual value of the photovoltaic power, For the predicted value of the photovoltaic power, epoch is the number of cycles of model training, batch is the number of batches of model training
(6) And predicting the photovoltaic power in a certain period of time in the future according to the photovoltaic power actual values and the historical irradiance prediction data at M times before the current time, and taking predicting the photovoltaic power in the future for 24 hours as an example:
firstly, PCA data dimension reduction is carried out on future 24h weather forecast data, the distance between the dimension reduced data w= [ w 1,w2,...ws ] and each clustering center in the step (3) is calculated, And selecting a prediction model corresponding to the clustering center, wherein the smallest distance is the similar day type of the future time period to be predicted.
Immediately, the photovoltaic power p= [ p t-M+1,pt-M,...pt ] and irradiance prediction data q= [ q t+1 ] at M times before the current time are taken as inputs, and a photovoltaic power predicted value p t+1 at the time t+1 is obtained through a corresponding similar day model.
Then, photovoltaic power p= [ p t-M,pt-M-1,...pt+1 ] and irradiance prediction data q= [ q t+2 ] at the first M times of the time t+1 are taken as inputs, and a photovoltaic power predicted value p t+2 at the time t+2 is obtained through a corresponding similar day model.
And then, continuously repeating the previous step to sequentially obtain t+3 and t+4 until the photovoltaic predicted power value of t+288.
According to the photovoltaic prediction method for similar day clustering, a K value average method is adopted to perform similar day clustering on daily weather prediction data in historical weather prediction data, a prediction model is trained for each similar day, the influence of different weather types on the prediction model is reduced, and the built model is more targeted. The PCA algorithm is adopted, so that the dimension of weather forecast data for clustering is effectively reduced, the calculated amount during clustering is shortened, and the influence of noise and invalid information on the clustering is restrained. The hierarchical long-short-term memory network is adopted, and the network input comprises the historical information of the output power and weather forecast information corresponding to the historical output power. And similar daily clustering is carried out according to different meteorological conditions, so that the photovoltaic power prediction accuracy under various non-ideal weather conditions is remarkably improved compared with the traditional single prediction model.
Referring to fig. 2, a prediction result on a sunny day is shown, where the real curve is the actual photovoltaic power value, and the predict curve is the prediction result obtained by using the method of the present invention. Referring to fig. 3, a prediction result in a rainy day is shown, where a curve real is an actual photovoltaic power value, a curve predict is a result obtained by using a common seasonal LSTM prediction method, a curve predict is a prediction result obtained by using the method of the present invention, a model obtained by classifying only a common season can be seen, the adaptability of the prediction result to abnormal weather such as rainy days is poor, the prediction result has a relatively large error with respect to the actual value, and the adaptability of the prediction result to abnormal weather is obviously improved by using a model obtained by clustering on a similar day.
The above is only for illustrating the technical idea of the present invention, and the protection scope of the present invention is not limited by this, and any modification made on the basis of the technical scheme according to the technical idea of the present invention falls within the protection scope of the claims of the present invention.

Claims (8)

1. The photovoltaic prediction method for the similar day clustering is characterized by comprising the following steps of:
s1: clustering the historical weather forecast data on similar days to obtain historical weather forecast data corresponding to various similar days;
S2: constructing an LSTM neural network model, and respectively using historical meteorological prediction data and historical photovoltaic power data corresponding to various similar days for training the LSTM neural network model to obtain an LSTM neural network prediction model corresponding to various similar days;
S3: determining a similar day type to which weather prediction data of a time period to be predicted belongs, and inputting the weather prediction data of the time period to be predicted and historical photovoltaic power data of a preset time before the time period to be predicted into an LSTM neural network prediction model corresponding to the similar day type to obtain a photovoltaic power prediction value;
The specific method of S1 is as follows:
s1-1: normalizing the historical weather forecast data to obtain normalized historical weather forecast data;
s1-2: performing dimension reduction processing on the normalized historical weather forecast data through a PCA algorithm to obtain dimension-reduced historical weather forecast data;
S1-3: clustering is carried out through a K value averaging method, and the historical weather forecast data after dimension reduction is classified according to the similarity, so that the historical weather forecast data corresponding to various similar days is obtained;
The specific method of S1-2 is as follows:
S1-2-1: all normalized historical meteorological prediction data are decentered through the following steps to obtain decentered historical meteorological data w i':
wherein m 0 is the characteristic dimension of the historical weather forecast data, and w j * is the normalized historical weather forecast data;
s1-2-2: calculating covariance matrixes W 'W' T of all the decentralised historical meteorological prediction data; wherein, W 'T is the transposed matrix of W';
S1-2-3: decomposing the covariance matrix W 'W' T as characteristic values to obtain m 0 characteristic values and m 0 characteristic vectors corresponding to m 0 characteristic values;
S1-2-4: taking the maximum m eigenvalues and the corresponding m eigenvectors to form a projection matrix;
s1-2-5: multiplying the matrix formed by the normalized historical weather forecast data with the projection matrix to obtain a reduced-dimension historical weather forecast data set W i=(wi1;wi2;...;wim) is the historical weather forecast data after the dimension reduction, and m is the characteristic dimension of the historical weather forecast data after the dimension reduction.
2. The photovoltaic prediction method of similar day clustering according to claim 1, wherein the specific method of S1-3 is as follows:
S1-3-1: dividing N pieces of dimension-reduced historical weather forecast data into k clusters C= { C 1,C2,...Ck }, wherein C k=(ck1,ck2,...ckm), and randomly selecting one piece of the dimension-reduced historical weather forecast data from the N pieces of dimension-reduced historical weather forecast data to serve as the center of the cluster C 1;
S1-3-2: calculating the shortest distance between each dimension-reduced historical weather forecast data and the center of the current cluster Wherein w i is the ith feature of each dimension-reduced historical weather forecast data, c i is the ith feature of the cluster center, and the probability/>, of each dimension-reduced historical weather forecast data being selected as the next cluster center is calculatedThen generating a random number of 0-1, and sequentially combining the random number with/>Compare until/>Greater than the random number, thenThe corresponding historical weather forecast data after dimension reduction is a cluster center;
s1-3-3: repeating S1-3-2 until cluster centers of all clusters are determined;
S1-3-4: dividing each dimension-reduced historical weather forecast data into clusters corresponding to the cluster center with the smallest distance according to the distance between each dimension-reduced historical weather forecast data and all cluster centers;
s1-3-5: re-calculating the cluster center of each cluster according to the historical weather forecast data after dimension reduction in each cluster, Wherein w j is the j-th historical weather forecast data in the cluster C i, and n ci is the number of samples of the historical weather forecast data in the cluster C i;
S1-3-6: repeating the steps S1-3-4 and S1-3-5 until the preset iteration times of the program or the center change distance of each cluster is smaller than a preset value;
s1-3-7: and determining the cluster center of each final cluster and all clusters to which the reduced-dimension historical weather forecast data belong, wherein each cluster is used as a similar day.
3. The photovoltaic prediction method of similar day clustering according to claim 1, wherein the specific method for constructing the LSTM neural network model in S2 is as follows:
R1: normalizing the historical photovoltaic power data and the photovoltaic irradiation prediction historical data to obtain normalized historical photovoltaic power data and normalized photovoltaic irradiation prediction historical data;
r2: establishing an LSTM network structure by adopting an LSTM algorithm, adopting normalized historical photovoltaic power data and normalized photovoltaic irradiation prediction historical data as inputs, obtaining a photovoltaic power prediction value through the LSTM network structure, and obtaining a photovoltaic power prediction error;
R3: calculating a cost function of the LSTM model, wherein the cost function is root mean square error of a photovoltaic power predicted value and a corresponding photovoltaic power true value, and adjusting LSTM network structure parameters according to the root mean square error by a random gradient descent method with batch;
R4: repeating R2 and R3 for a preset number of times to obtain the LSTM neural network model.
4. The photovoltaic prediction method of similar day clustering according to claim 1, wherein the specific method for determining the similar day type to which the weather prediction data of the period to be predicted belongs in S3 is as follows:
and calculating the distance between the weather forecast data of the time period to be forecast and the center of each similar day type, wherein the weather forecast data of the time period to be forecast is the similar day type closest to the center.
5. The photovoltaic prediction method of similar day clustering according to claim 1, wherein the specific method for inputting the weather prediction data of the period to be predicted and the historical photovoltaic power data of the preset time before the period to be predicted into the LSTM neural network prediction model corresponding to the similar day type to obtain the photovoltaic power prediction value in S3 is as follows:
T1: taking the actual photovoltaic power values of K times before the current T N time and weather forecast data of the T N+1 time as inputs, and obtaining a photovoltaic power forecast value of the T N+1 time through an LSTM neural network model corresponding to a similar day type to which the weather forecast data of the T N+1 time belongs;
T2: taking the actual photovoltaic power values of K times before the time T N+1 and weather forecast data of the time T N+2 as inputs, and obtaining the photovoltaic power forecast value of the time T N+2 through an LSTM neural network model corresponding to the similar day type to which the weather forecast data of the time T N+2 belongs;
T3: and repeating the step T2 until a photovoltaic power predicted value from the moment T N+1 to the end of the whole period to be predicted is obtained.
6. An LSTM photovoltaic prediction apparatus for similar day clustering, comprising:
The similar day clustering module is used for clustering the historical weather forecast data on similar days to obtain historical weather forecast data corresponding to various similar days, and obtaining photovoltaic historical data of various similar days according to the time of the historical weather data of various similar days;
The LSTM neural network model module is used for constructing an LSTM neural network model, and respectively using the historical meteorological prediction data and the historical photovoltaic power data corresponding to various similar days for training the LSTM neural network model to obtain the LSTM neural network prediction model corresponding to various similar days;
The photovoltaic power prediction module is used for determining a similar day type to which weather prediction data of a time period to be predicted belong, and inputting the weather prediction data of the time period to be predicted and historical photovoltaic power data of a preset time before the time period to be predicted into an LSTM neural network prediction model corresponding to the similar day type to obtain a photovoltaic power prediction value;
The specific method for clustering the historical weather forecast data on similar days to obtain the historical weather forecast data corresponding to various similar days comprises the following steps:
s1-1: normalizing the historical weather forecast data to obtain normalized historical weather forecast data;
s1-2: performing dimension reduction processing on the normalized historical weather forecast data through a PCA algorithm to obtain dimension-reduced historical weather forecast data;
S1-3: clustering is carried out through a K value averaging method, and the historical weather forecast data after dimension reduction is classified according to the similarity, so that the historical weather forecast data corresponding to various similar days is obtained;
The method for obtaining the reduced-dimension historical weather forecast data comprises the following steps of:
S1-2-1: all normalized historical meteorological prediction data are decentered through the following steps to obtain decentered historical meteorological data w i':
wherein m 0 is the characteristic dimension of the historical weather forecast data, and w j * is the normalized historical weather forecast data;
s1-2-2: calculating covariance matrixes W 'W' T of all the decentralised historical meteorological prediction data; wherein, W 'T is the transposed matrix of W';
S1-2-3: decomposing the covariance matrix W 'W' T as characteristic values to obtain m 0 characteristic values and m 0 characteristic vectors corresponding to m 0 characteristic values;
S1-2-4: taking the maximum m eigenvalues and the corresponding m eigenvectors to form a projection matrix;
s1-2-5: multiplying the matrix formed by the normalized historical weather forecast data with the projection matrix to obtain a reduced-dimension historical weather forecast data set W i=(wi1;wi2;...;wim) is the historical weather forecast data after the dimension reduction, and m is the characteristic dimension of the historical weather forecast data after the dimension reduction.
7. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 5 when the computer program is executed.
8. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 5.
CN201911130195.0A 2019-11-18 2019-11-18 Photovoltaic prediction method, device and equipment for similar day clustering and readable storage medium Active CN111091139B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911130195.0A CN111091139B (en) 2019-11-18 2019-11-18 Photovoltaic prediction method, device and equipment for similar day clustering and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911130195.0A CN111091139B (en) 2019-11-18 2019-11-18 Photovoltaic prediction method, device and equipment for similar day clustering and readable storage medium

Publications (2)

Publication Number Publication Date
CN111091139A CN111091139A (en) 2020-05-01
CN111091139B true CN111091139B (en) 2024-04-19

Family

ID=70393169

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911130195.0A Active CN111091139B (en) 2019-11-18 2019-11-18 Photovoltaic prediction method, device and equipment for similar day clustering and readable storage medium

Country Status (1)

Country Link
CN (1) CN111091139B (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111695601B (en) * 2020-05-15 2023-06-20 特变电工西安电气科技有限公司 Photovoltaic power prediction method, device, equipment and readable storage medium
CN111754026B (en) * 2020-05-28 2024-03-15 国网冀北电力有限公司 Photovoltaic power station group power prediction method and device, computer equipment and storage medium
CN112052985B (en) * 2020-08-07 2023-11-03 南京易司拓电力科技股份有限公司 Middle-short-term low-voltage prediction method based on lightgbm
CN112365081A (en) * 2020-11-24 2021-02-12 国家电网有限公司 Photovoltaic power station power generation capacity prediction method and device
CN112366708B (en) * 2020-11-30 2023-07-25 深圳市康必达控制技术有限公司 Charging management method, device, equipment and storage medium
CN112686443A (en) * 2020-12-30 2021-04-20 南京工程学院 Photovoltaic power generation prediction method based on artificial intelligence
CN112925824A (en) * 2021-02-25 2021-06-08 山东大学 Photovoltaic power prediction method and system for extreme weather type
CN112862630B (en) * 2021-03-08 2024-03-22 海南省电力学校(海南省电力技工学校) Photovoltaic power prediction method, terminal and medium based on weather type index interval
CN112884238A (en) * 2021-03-12 2021-06-01 国网冀北电力有限公司电力科学研究院 Photovoltaic power generation power prediction method and device
CN113240153A (en) * 2021-04-09 2021-08-10 水发兴业能源(珠海)有限公司 Photovoltaic power generation data prediction method and device, computing equipment and storage medium
CN113919232A (en) * 2021-10-25 2022-01-11 北京航天创智科技有限公司 Photovoltaic power station power prediction method and system based on recurrent neural network
TWI810750B (en) * 2021-12-20 2023-08-01 國立成功大學 Solar power forecasting method
CN114493051A (en) * 2022-04-08 2022-05-13 南方电网数字电网研究院有限公司 Photovoltaic power prediction method and device for improving precision based on combined prediction
CN115660132B (en) * 2022-08-05 2024-01-30 科大数字(上海)能源科技有限公司 Photovoltaic power generation power prediction method and system
CN115392387B (en) * 2022-09-01 2023-08-08 国网江苏省电力有限公司镇江供电分公司 Low-voltage distributed photovoltaic power generation output prediction method
CN116128150B (en) * 2023-03-02 2023-07-14 南京邮电大学 Photovoltaic intelligent output prediction method based on two-stage optimization
CN116742624B (en) * 2023-08-10 2023-11-03 华能新能源股份有限公司山西分公司 Photovoltaic power generation amount prediction method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103390200A (en) * 2013-07-18 2013-11-13 国家电网公司 Photovoltaic power station electricity generation output power forecasting method based on similar days
CN108564192A (en) * 2017-12-29 2018-09-21 河海大学 A kind of short-term photovoltaic power prediction technique based on meteorological factor weight similar day
CN108846527A (en) * 2018-08-27 2018-11-20 云南电网有限责任公司电力科学研究院 A kind of photovoltaic power generation power prediction method
CN109002915A (en) * 2018-07-13 2018-12-14 福州大学 Photovoltaic plant short term power prediction technique based on Kmeans-GRA-Elman model

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011120172A1 (en) * 2010-03-31 2011-10-06 Ats Automation Tooling Systems Inc. Light generator systems and methods
US9825580B2 (en) * 2014-09-26 2017-11-21 State Grid Corporation Of China Method for constructing real-time solar irradiation metering network of gigawatts level photovoltaic power generation base

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103390200A (en) * 2013-07-18 2013-11-13 国家电网公司 Photovoltaic power station electricity generation output power forecasting method based on similar days
CN108564192A (en) * 2017-12-29 2018-09-21 河海大学 A kind of short-term photovoltaic power prediction technique based on meteorological factor weight similar day
CN109002915A (en) * 2018-07-13 2018-12-14 福州大学 Photovoltaic plant short term power prediction technique based on Kmeans-GRA-Elman model
CN108846527A (en) * 2018-08-27 2018-11-20 云南电网有限责任公司电力科学研究院 A kind of photovoltaic power generation power prediction method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
卢舟鑫 ; 王冰 ; 荣军峰 ; .基于多时段综合相似日的光伏发电功率预测.电源技术.2017,(01),全文. *
王知芳 ; 杨秀 ; 潘爱强 ; .一种新的电压偏差预测方法.电力工程技术.2018,(05),全文. *
王知芳 ; 杨秀 ; 潘爱强 ; 陈甜甜 ; 谢真桢 ; .基于改进集成聚类和BP神经网络的电压偏差预测.电工电能新技术.2018,(05),全文. *
陈云龙 ; 殷豪 ; 孟安波 ; 欧晓峰 ; 刘哲 ; .一种短期光伏出力的区间预测方法.广东电力.2018,(02),全文. *

Also Published As

Publication number Publication date
CN111091139A (en) 2020-05-01

Similar Documents

Publication Publication Date Title
CN111091139B (en) Photovoltaic prediction method, device and equipment for similar day clustering and readable storage medium
CN111695601B (en) Photovoltaic power prediction method, device, equipment and readable storage medium
CN107766990B (en) Method for predicting power generation power of photovoltaic power station
De Giorgi et al. Comparison of strategies for multi-step ahead photovoltaic power forecasting models based on hybrid group method of data handling networks and least square support vector machine
CN110909919A (en) Photovoltaic power prediction method of depth neural network model with attention mechanism fused
Tahmasebifar et al. A new hybrid model for point and probabilistic forecasting of wind power
CN108717579B (en) Short-term wind power interval prediction method
CN114792156A (en) Photovoltaic output power prediction method and system based on curve characteristic index clustering
CN114511132A (en) Photovoltaic output short-term prediction method and prediction system
CN111626473A (en) Two-stage photovoltaic power prediction method considering error correction
CN114004139A (en) Photovoltaic power generation power prediction method
Ghofrani et al. Hybrid clustering-time series-bayesian neural network short-term load forecasting method
CN114676923A (en) Method and device for predicting generated power, computer equipment and storage medium
CN116629416A (en) Photovoltaic power station power prediction method and device
CN116435998A (en) Prediction method of photovoltaic power generation power
Teferra et al. Fuzzy-based prediction of solar PV and wind power generation for microgrid modeling using particle swarm optimization
CN112215428A (en) Photovoltaic power generation power prediction method and system based on error correction and fuzzy logic
CN110852492A (en) Photovoltaic power ultra-short-term prediction method for finding similarity based on Mahalanobis distance
CN116167465A (en) Solar irradiance prediction method based on multivariate time series ensemble learning
CN110598896A (en) Photovoltaic power prediction method based on prediction error correction
Chang et al. Forecasting wind power generation by a new type of radial basis function-based neural network
Xiaoyun et al. Short-Term wind power prediction of regions based on deep long short-term memory network and gaussian process regression
CN116484998A (en) Distributed photovoltaic power station power prediction method and system based on meteorological similar day
CN112215383A (en) Distributed photovoltaic power generation power prediction method and system
Li et al. A short-term photovoltaic output prediction method based on improved PSO-RVM 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
GR01 Patent grant